Package org.astrogrid.samp.test
Class MessageSender.MetaClient
- java.lang.Object
-
- org.astrogrid.samp.test.MessageSender.MetaClient
-
- All Implemented Interfaces:
Client
- Enclosing class:
- MessageSender
private static class MessageSender.MetaClient extends java.lang.Object implements Client
Client implementation which may know about metadata.
-
-
Constructor Summary
Constructors Constructor Description MetaClient(java.lang.String id, HubConnection connection)
Constructor which attempts to acquire metadata from a given hub connection.MetaClient(java.lang.String id, Metadata meta)
Constructor which uses supplied metadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.java.lang.String
toString()
-
-
-
Field Detail
-
id_
private final java.lang.String id_
-
meta_
private final Metadata meta_
-
-
Constructor Detail
-
MetaClient
public MetaClient(java.lang.String id, HubConnection connection) throws SampException
Constructor which attempts to acquire metadata from a given hub connection.- Parameters:
client
- idconnection
- hub connection- Throws:
SampException
-
MetaClient
public MetaClient(java.lang.String id, Metadata meta)
Constructor which uses supplied metadata.- Parameters:
id
- client idmeta
- metadata (may be null)
-
-
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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-