mil.navy.nps.bridge
Class Client

java.lang.Object
  extended bymil.navy.nps.bridge.Client

public class Client
extends java.lang.Object


Field Summary
(package private)  java.net.InetAddress clientAddress
           
(package private)  int port
           
(package private)  long timestamp
           
 
Constructor Summary
Client(java.net.InetAddress pClientAddress, int pPort)
          Constructor; takes as arguments the place to forward packets to, in the form of a unicast address, and a port on that machine to send packets to.
Client(java.lang.String pSubscribeCommand)
          Constructor; gets the whole subscribe command from the packet, which we parse out into the inet address and port of where we should send this.
 
Method Summary
 boolean equals(java.lang.Object pObject)
          One client is equal to anothr if it has the same address and the same port.
 long getTimestamp()
          Returns time this client was last heard from
 int hashCode()
          Hashcode, used for fast access in various data structures.
 void setTimestamp()
          set the timestamp to the current time.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clientAddress

java.net.InetAddress clientAddress

port

int port

timestamp

long timestamp
Constructor Detail

Client

public Client(java.lang.String pSubscribeCommand)
Constructor; gets the whole subscribe command from the packet, which we parse out into the inet address and port of where we should send this.


Client

public Client(java.net.InetAddress pClientAddress,
              int pPort)
Constructor; takes as arguments the place to forward packets to, in the form of a unicast address, and a port on that machine to send packets to. Client is automatically timestamped.

Method Detail

hashCode

public int hashCode()
Hashcode, used for fast access in various data structures. This is just the inet address hashcode; good enough.


equals

public boolean equals(java.lang.Object pObject)
One client is equal to anothr if it has the same address and the same port.


setTimestamp

public void setTimestamp()
set the timestamp to the current time.


getTimestamp

public long getTimestamp()
Returns time this client was last heard from