Class 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
  • Constructor Details

    • 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