Constructors Summary |
---|
public SessionAddress(InetAddress dataAddress, int dataPort)Constructor to create an SessionAddress given the data internet
address and data port.
m_dataAddress = dataAddress;
m_controlAddress = dataAddress;
m_dataPort = dataPort;
m_controlPort = dataPort + 1;
|
public SessionAddress(InetAddress dataAddress, int dataPort, int timeToLive)Constructor to create an SessionAddress given the data internet
address and data port.
m_dataAddress = dataAddress;
m_controlAddress = dataAddress;
m_dataPort = dataPort;
m_controlPort = dataPort + 1;
ttl= timeToLive;
|
public SessionAddress(InetAddress dataAddress, int dataPort, InetAddress controlAddress, int controlPort)Constructor to create an SessionAddress given both internet
address and ports.
m_dataAddress = dataAddress;
m_controlAddress = controlAddress;
m_dataPort = dataPort;
m_controlPort = controlPort;
|
public SessionAddress()Constructor to create an "empty" RTPSesionAddress. Equivalent
to calling SessionAddress(null, ANY_PORT, null, ANY_PORT).
this(null, ANY_PORT, null, ANY_PORT);
|
Methods Summary |
---|
public boolean | equals(java.lang.Object obj)
if (obj instanceof SessionAddress){
SessionAddress otheraddr = (SessionAddress)obj;
InetAddress otherdest = otheraddr.getDataAddress();
InetAddress othercontl = otheraddr.getControlAddress();
int dport = otheraddr.getDataPort();
int cport = otheraddr.getControlPort();
if ( (otherdest.equals(m_dataAddress)) &&
(othercontl.equals(m_controlAddress)) &&
(dport == m_dataPort) &&
(cport == m_controlPort))
return true;
}
return false;
|
public java.net.InetAddress | getControlAddress()Access method to get the control address of this SessionAddress.
return m_controlAddress;
|
public java.lang.String | getControlHostAddress()Returns the IP address string of the control address host.
return m_controlAddress.getHostAddress();
|
public int | getControlPort()Access method to get the control port of this SessionAddress.
return m_controlPort;
|
public java.net.InetAddress | getDataAddress()Access method to get the data address of this SessionAddress.
return m_dataAddress;
|
public java.lang.String | getDataHostAddress()Returns the IP address string of the data address host.
return m_dataAddress.getHostAddress();
|
public int | getDataPort()Access method to get the data port of this SessionAddress.
return m_dataPort;
|
public int | getTimeToLive()Returns the time-to-live value for mutlicast sessions.
return ttl;
|
public int | hashCode()
return 1;
|
public void | setControlHostAddress(java.net.InetAddress controlAddress)Access method to set the control address of this SessionAddress.
m_controlAddress= controlAddress;
|
public void | setControlPort(int controlPort)Access method to set the control port of this SessionAddress.
m_controlPort= controlPort;
|
public void | setDataHostAddress(java.net.InetAddress dataAddress)Access method to set the data address of this SessionAddress.
m_dataAddress= dataAddress;
|
public void | setDataPort(int dataPort)Access method to set the data port of this SessionAddress.
m_dataPort= dataPort;
|
public java.lang.String | toString()
String s= "DataAddress: ";
if( m_dataAddress != null)
s+= m_dataAddress.toString();
else s+= "null";
s+= "\nControlAddress: ";
if( m_controlAddress != null)
s+= m_controlAddress.toString();
else s+= "null";
s+= ("\nDataPort: " + m_dataPort + "\nControlPort: " + m_controlPort);
return s;
|