Openfire 3.9.3 Javadoc

org.jivesoftware.openfire.mediaproxy
Class RelaySession

java.lang.Object
  extended by java.lang.Thread
      extended by org.jivesoftware.openfire.mediaproxy.MediaProxySession
          extended by org.jivesoftware.openfire.mediaproxy.RelaySession
All Implemented Interfaces:
Runnable, DatagramListener, ProxyCandidate

public class RelaySession
extends MediaProxySession

A Session Class will control "receive and relay" proccess. It creates UDP channels from Host A to Host B and from Host B to Host A using or NOT the specified hosts and ports. The IP and port pairs can change depending of the Senders IP and port. Which means that the IP and port values of the points can dynamic change after the Channel is opened. When the agent receives a packet from Point A, the channel set the point A IP and port according to the received packet sender IP and port. Every packet received from Point B will be relayed to the new Point A IP and port. When the agent receives a packet from Point B, the channel set the point B IP and port according to the received packet sender IP and port. Every packet received from Point A will be relayed to the new Point B IP and port. Create a dynamic channel between two IPs. ( Dynamic Point A - Dynamic Point B ) It has 4 Channels. 2 for data and 2 for control.

Author:
Thiago Camargo

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class org.jivesoftware.openfire.mediaproxy.MediaProxySession
channelAtoB, channelAtoBControl, channelBtoA, channelBtoAControl, hostA, hostB, localAddress, localPortA, localPortB, portA, portB, socketA, socketAControl, socketB, socketBControl, threadAtoB, threadAtoBControl, threadBtoA, threadBtoAControl
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RelaySession(String id, String creator, String localhost, String hostA, int portA, String hostB, int portB)
          Creates a new Smart Session to provide connectivity between Host A and Host B.
RelaySession(String id, String creator, String localhost, String hostA, int portA, String hostB, int portB, int minPort, int maxPort)
          Creates a new Smart Session to provide connectivity between Host A and Host B.
 
Method Summary
 
Methods inherited from class org.jivesoftware.openfire.mediaproxy.MediaProxySession
addAgentListener, clearAgentListeners, datagramReceived, dispatchAgentStopped, getCreator, getFreePort, getHostA, getHostB, getLocalhost, getLocalPortA, getLocalPortB, getPass, getPortA, getPortB, getSID, getTimestamp, removeAgentListener, run, sendFromPortA, sendFromPortB, setHostA, setHostB, setPortA, setPortB, stopAgent
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jivesoftware.openfire.mediaproxy.ProxyCandidate
start
 

Constructor Detail

RelaySession

public RelaySession(String id,
                    String creator,
                    String localhost,
                    String hostA,
                    int portA,
                    String hostB,
                    int portB,
                    int minPort,
                    int maxPort)
Creates a new Smart Session to provide connectivity between Host A and Host B.

Parameters:
id - of the Session (Could be a Jingle session ID)
localhost - The localhost IP that will listen for UDP packets
hostA - the hostname or IP of the point A of the Channel
portA - the port number point A of the Channel
hostB - the hostname or IP of the point B of the Channel
portB - the port number point B of the Channel
creator - the created name or description of the Channel
minPort - the minimal port number to be used by the proxy
maxPort - the maximun port number to be used by the proxy

RelaySession

public RelaySession(String id,
                    String creator,
                    String localhost,
                    String hostA,
                    int portA,
                    String hostB,
                    int portB)
Creates a new Smart Session to provide connectivity between Host A and Host B.

Parameters:
id - of the Session (Could be a Jingle session ID)
localhost - The localhost IP that will listen for UDP packets
hostA - the hostname or IP of the point A of the Channel
portA - the port number point A of the Channel
hostB - the hostname or IP of the point B of the Channel
portB - the port number point B of the Channel
creator - the created name or description of the Channel

Openfire 3.9.3 Javadoc

Copyright © 2003-2008 Jive Software.