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.Stringid_private Metadatametadata_private Subscriptionssubscriptions_
-
Constructor Summary
Constructors Constructor Description TrackedClient(java.lang.String id)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetId()Returns the public identifier for this client.MetadatagetMetadata()Returns the currently declared metadata for this client, if any.SubscriptionsgetSubscriptions()Returns the currently declared subscriptions for this client, if any.inthashCode()(package private) voidsetMetadata(java.util.Map metadata)Sets this client's metadata.(package private) voidsetSubscriptions(java.util.Map subscriptions)Sets this client's subscriptions.java.lang.StringtoString()
-
-
-
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:ClientReturns the public identifier for this client.
-
getMetadata
public Metadata getMetadata()
Description copied from interface:ClientReturns the currently declared metadata for this client, if any.- Specified by:
getMetadatain interfaceClient- Returns:
- metadata object; may be null
-
getSubscriptions
public Subscriptions getSubscriptions()
Description copied from interface:ClientReturns the currently declared subscriptions for this client, if any.- Specified by:
getSubscriptionsin 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-