ikrs.yuccasrv
Class UDPConnectionUserID
java.lang.Object
ikrs.yuccasrv.DefaultConnectionUserID
ikrs.yuccasrv.UDPConnectionUserID
- All Implemented Interfaces:
- ConnectionUserID<UDPConnectionUserID>, java.lang.Comparable<UDPConnectionUserID>
public class UDPConnectionUserID
- extends DefaultConnectionUserID
- implements ConnectionUserID<UDPConnectionUserID>
The TCPConnectionUserID implements the ConnectionUserID interface for the use of incoming TCP connections.
Essentials required to identify users are:
- serverID
- bind address
- bind port
- remote address (when the remote address changes the user is considered 'new' -> session timeout)
Constructor Summary |
UDPConnectionUserID(java.util.UUID serverID,
java.net.InetAddress localAddress,
int localPort,
java.net.InetAddress remoteAddress)
|
Method Summary |
int |
compareTo(UDPConnectionUserID userID)
This method compares this connection user ID with the given ID. |
boolean |
equals(java.lang.Object o)
This method compares this connection user ID with the given object. |
boolean |
equals(UDPConnectionUserID userID)
This method compares this connection user ID with the given ID. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UDPConnectionUserID
public UDPConnectionUserID(java.util.UUID serverID,
java.net.InetAddress localAddress,
int localPort,
java.net.InetAddress remoteAddress)
throws java.lang.NullPointerException
- Throws:
java.lang.NullPointerException
equals
public boolean equals(java.lang.Object o)
- Description copied from class:
DefaultConnectionUserID
- This method compares this connection user ID with the given object.
- Specified by:
equals
in interface ConnectionUserID<UDPConnectionUserID>
- Overrides:
equals
in class DefaultConnectionUserID
- Returns:
- true if and only if this and the given object are equal.
- See Also:
java.lang.Object.equals( Object )
equals
public boolean equals(UDPConnectionUserID userID)
- This method compares this connection user ID with the given ID.
- Specified by:
equals
in interface ConnectionUserID<UDPConnectionUserID>
- Returns:
- true if and only if this and the given ID are equal.
- See Also:
java.lang.Object.equals( Object )
compareTo
public int compareTo(UDPConnectionUserID userID)
- This method compares this connection user ID with the given ID.
If this ID is 'smaller' than the passed ID, the method returns a negative integer.
If this ID is 'bigger' than the passed ID, the method returns a positive integer.
If this ID equals the passed ID, the method returns 0.
- Specified by:
compareTo
in interface ConnectionUserID<UDPConnectionUserID>
- Specified by:
compareTo
in interface java.lang.Comparable<UDPConnectionUserID>
- Returns:
- A value indicating the order of the two ID.
- See Also:
ConnectionUserID.equals( ConnectionUserID )