javax.media.rtp
Class SessionAddress

java.lang.Object
  |
  +--javax.media.rtp.SessionAddress
All Implemented Interfaces:
java.io.Serializable

public class SessionAddress
extends java.lang.Object
implements java.io.Serializable

Class to encapsulate a pair of internet address and a pair of ports for use in RTPSM methods.

See Also:
Serialized Form

Field Summary
static int ANY_PORT
           
 
Constructor Summary
SessionAddress()
          Constructor to create an "empty" RTPSesionAddress.
SessionAddress(java.net.InetAddress dataAddress, int dataPort)
          Constructor to create an SessionAddress given the data internet address and data port.
SessionAddress(java.net.InetAddress dataAddress, int dataPort, java.net.InetAddress controlAddress, int controlPort)
          Constructor to create an SessionAddress given both internet address and ports.
SessionAddress(java.net.InetAddress dataAddress, int dataPort, int timeToLive)
          Constructor to create an SessionAddress given the data internet address and data port.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.net.InetAddress getControlAddress()
          Access method to get the control address of this SessionAddress.
 java.lang.String getControlHostAddress()
          Returns the IP address string of the control address host.
 int getControlPort()
          Access method to get the control port of this SessionAddress.
 java.net.InetAddress getDataAddress()
          Access method to get the data address of this SessionAddress.
 java.lang.String getDataHostAddress()
          Returns the IP address string of the data address host.
 int getDataPort()
          Access method to get the data port of this SessionAddress.
 int getTimeToLive()
          Returns the time-to-live value for mutlicast sessions.
 int hashCode()
           
 void setControlHostAddress(java.net.InetAddress controlAddress)
          Access method to set the control address of this SessionAddress.
 void setControlPort(int controlPort)
          Access method to set the control port of this SessionAddress.
 void setDataHostAddress(java.net.InetAddress dataAddress)
          Access method to set the data address of this SessionAddress.
 void setDataPort(int dataPort)
          Access method to set the data port of this SessionAddress.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ANY_PORT

public static final int ANY_PORT
See Also:
Constant Field Values
Constructor Detail

SessionAddress

public SessionAddress(java.net.InetAddress dataAddress,
                      int dataPort)
Constructor to create an SessionAddress given the data internet address and data port.

Parameters:
dataAddress - The data address.

dataPort - The data port. If this value is passed as the constant ANY_PORT, the object will not represent a specific data port.


SessionAddress

public SessionAddress(java.net.InetAddress dataAddress,
                      int dataPort,
                      int timeToLive)
Constructor to create an SessionAddress given the data internet address and data port.

Parameters:
dataAddress - The data address.

dataPort - The data port. If this value is passed as the constant ANY_PORT, the object will not represent a specific data port.

timeToLive - The time-to-live parameter for multicast sessions


SessionAddress

public SessionAddress(java.net.InetAddress dataAddress,
                      int dataPort,
                      java.net.InetAddress controlAddress,
                      int controlPort)
Constructor to create an SessionAddress given both internet address and ports.

Parameters:
dataAddress - The data address.

dataPort - The data port. If this value is passed as the constant ANY_PORT, the object will not represent a specific data port.

controlAddress - The control address.

controlPort - The control port. If this value is passed as the constant ANY_PORT, the object will not represent a specific control port.


SessionAddress

public SessionAddress()
Constructor to create an "empty" RTPSesionAddress. Equivalent to calling SessionAddress(null, ANY_PORT, null, ANY_PORT).

Method Detail

getTimeToLive

public int getTimeToLive()
Returns the time-to-live value for mutlicast sessions.


getDataAddress

public java.net.InetAddress getDataAddress()
Access method to get the data address of this SessionAddress.


setDataHostAddress

public void setDataHostAddress(java.net.InetAddress dataAddress)
Access method to set the data address of this SessionAddress.


setDataPort

public void setDataPort(int dataPort)
Access method to set the data port of this SessionAddress.


getDataHostAddress

public java.lang.String getDataHostAddress()
Returns the IP address string of the data address host.


getDataPort

public int getDataPort()
Access method to get the data port of this SessionAddress.


getControlAddress

public java.net.InetAddress getControlAddress()
Access method to get the control address of this SessionAddress.


setControlHostAddress

public void setControlHostAddress(java.net.InetAddress controlAddress)
Access method to set the control address of this SessionAddress.


setControlPort

public void setControlPort(int controlPort)
Access method to set the control port of this SessionAddress.


getControlHostAddress

public java.lang.String getControlHostAddress()
Returns the IP address string of the control address host.


getControlPort

public int getControlPort()
Access method to get the control port of this SessionAddress.


equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object