org.jivesoftware.openfire.mediaproxy
Class RelaySession
java.lang.Object
java.lang.Thread
org.jivesoftware.openfire.mediaproxy.MediaProxySession
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
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 |
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. |
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 |
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 packetshostA
- the hostname or IP of the point A of the ChannelportA
- the port number point A of the ChannelhostB
- the hostname or IP of the point B of the ChannelportB
- the port number point B of the Channelcreator
- the created name or description of the ChannelminPort
- the minimal port number to be used by the proxymaxPort
- 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 packetshostA
- the hostname or IP of the point A of the ChannelportA
- the port number point A of the ChannelhostB
- the hostname or IP of the point B of the ChannelportB
- the port number point B of the Channelcreator
- the created name or description of the Channel
Copyright © 2003-2008 Jive Software.