amber.type.server
Class SocketData

java.lang.Object
  |
  +--amber.type.server.SocketData
All Implemented Interfaces:
java.io.Serializable

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

This class holds some information on a socket connection established to a remote system.

Version:
1.0.0
Author:
Dr. David J. Knowles
See Also:
Serialized Form

Field Summary
protected  java.net.InetAddress localAddress
          The address on the server of the connection to this page.
protected  int localPort
          The port on the server of the connection to this page.
protected  java.net.InetAddress remoteAddress
          The remote address of the connection to this page.
protected  int remotePort
          The remote port of the connection to this page.
 
Constructor Summary
SocketData()
          Default Constructor.
SocketData(java.net.InetAddress remoteAddress, int remotePort)
          Initialising Constructor.
SocketData(java.net.InetAddress remoteAddress, int remotePort, java.net.InetAddress localAddress, int localPort)
          Initialising Constructor.
 
Method Summary
 java.net.InetAddress getLocalAddress()
          Gets the data in the following variable: The address on the server of the connection to this page.
 int getLocalPort()
          Gets the data in the following variable: The port on the server of the connection to this page.
 java.net.InetAddress getRemoteAddress()
          Gets the data in the following variable: The remote address of the connection to this page.
 int getRemotePort()
          Gets the data in the following variable: The remote port of the connection to this page.
 void setLocalAddress(java.net.InetAddress data)
          Sets the data in the following variable: The address on the server of the connection to this page.
 void setLocalPort(int data)
          Sets the data in the following variable: The port on the server of the connection to this page.
 void setRemoteAddress(java.net.InetAddress data)
          Sets the data in the following variable: The remote address of the connection to this page.
 void setRemotePort(int data)
          Sets the data in the following variable: The remote port of the connection to this page.
 java.lang.String toString()
          This function returns the String form of the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

remoteAddress

protected java.net.InetAddress remoteAddress
The remote address of the connection to this page.

remotePort

protected int remotePort
The remote port of the connection to this page.

localPort

protected int localPort
The port on the server of the connection to this page.

localAddress

protected java.net.InetAddress localAddress
The address on the server of the connection to this page.
Constructor Detail

SocketData

public SocketData()
Default Constructor.

SocketData

public SocketData(java.net.InetAddress remoteAddress,
                  int remotePort,
                  java.net.InetAddress localAddress,
                  int localPort)
Initialising Constructor.
Parameters:
remoteAddress - The remote address of the connection to this page.
remotePort - The remote port of the connection to this page.
localAddress - The address on the server of the connection to this page.
localPort - The port on the server of the connection to this page.

SocketData

public SocketData(java.net.InetAddress remoteAddress,
                  int remotePort)
Initialising Constructor.
Parameters:
remoteAddress - The remote address of the connection to this page.
remotePort - The remote port of the connection to this page.
Method Detail

getRemoteAddress

public java.net.InetAddress getRemoteAddress()
Gets the data in the following variable: The remote address of the connection to this page.
Returns:
InetAddress containing the required information.

getRemotePort

public int getRemotePort()
Gets the data in the following variable: The remote port of the connection to this page.
Returns:
int containing the required information.

getLocalPort

public int getLocalPort()
Gets the data in the following variable: The port on the server of the connection to this page.
Returns:
int containing the required information.

getLocalAddress

public java.net.InetAddress getLocalAddress()
Gets the data in the following variable: The address on the server of the connection to this page.
Returns:
InetAddress containing the required information.

setRemoteAddress

public void setRemoteAddress(java.net.InetAddress data)
Sets the data in the following variable: The remote address of the connection to this page.
Parameters:
data - InetAddress containing the data to set the variable to.

setRemotePort

public void setRemotePort(int data)
Sets the data in the following variable: The remote port of the connection to this page.
Parameters:
data - int containing the data to set the variable to.

setLocalPort

public void setLocalPort(int data)
Sets the data in the following variable: The port on the server of the connection to this page.
Parameters:
data - int containing the data to set the variable to.

setLocalAddress

public void setLocalAddress(java.net.InetAddress data)
Sets the data in the following variable: The address on the server of the connection to this page.
Parameters:
data - InetAddress containing the data to set the variable to.

toString

public java.lang.String toString()
This function returns the String form of the data.
Overrides:
toString in class java.lang.Object
Returns:
String containing the string version of this class.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.