Package org.astrogrid.samp.client
Class ClientTracker.TrackedClient
- java.lang.Object
-
- org.astrogrid.samp.client.ClientTracker.TrackedClient
-
- All Implemented Interfaces:
Client
- Enclosing class:
- ClientTracker
private static class ClientTracker.TrackedClient extends java.lang.Object implements Client
Client implementation used to populate internal data structures. It just implements the Client interface as well as adding mutators for metadata and subscriptions, and providing an equals method based on public id.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
id_
private Metadata
metadata_
private Subscriptions
subscriptions_
-
Constructor Summary
Constructors Constructor Description TrackedClient(java.lang.String id)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getId()
Returns the public identifier for this client.Metadata
getMetadata()
Returns the currently declared metadata for this client, if any.Subscriptions
getSubscriptions()
Returns the currently declared subscriptions for this client, if any.int
hashCode()
(package private) void
setMetadata(java.util.Map metadata)
Sets this client's metadata.(package private) void
setSubscriptions(java.util.Map subscriptions)
Sets this client's subscriptions.java.lang.String
toString()
-
-
-
Field Detail
-
id_
private final java.lang.String id_
-
metadata_
private Metadata metadata_
-
subscriptions_
private Subscriptions subscriptions_
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from interface:Client
Returns the public identifier for this client.
-
getMetadata
public Metadata getMetadata()
Description copied from interface:Client
Returns the currently declared metadata for this client, if any.- Specified by:
getMetadata
in interfaceClient
- Returns:
- metadata object; may be null
-
getSubscriptions
public Subscriptions getSubscriptions()
Description copied from interface:Client
Returns the currently declared subscriptions for this client, if any.- Specified by:
getSubscriptions
in interfaceClient
- Returns:
- subscriptions object; may be null
-
setMetadata
void setMetadata(java.util.Map metadata)
Sets this client's metadata.- Parameters:
metadata
- new metadata
-
setSubscriptions
void setSubscriptions(java.util.Map subscriptions)
Sets this client's subscriptions.- Parameters:
subscriptions
- new subscriptions
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-