Package org.astrogrid.samp.hub
Class MetaQueryMessageHandler
- java.lang.Object
-
- org.astrogrid.samp.client.AbstractMessageHandler
-
- org.astrogrid.samp.hub.MetaQueryMessageHandler
-
- All Implemented Interfaces:
MessageHandler
class MetaQueryMessageHandler extends AbstractMessageHandler
Implements MType for querying registered clients by metadata item.- Since:
- 21 Nov 2011
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
BASE_MTYPE
private ClientSet
clientSet_
-
Constructor Summary
Constructors Constructor Description MetaQueryMessageHandler(ClientSet clientSet)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map
processCall(HubConnection conn, java.lang.String senderId, Message msg)
Implements message processing.-
Methods inherited from class org.astrogrid.samp.client.AbstractMessageHandler
createResponse, getSubscriptions, receiveCall, receiveNotification, setSubscriptions
-
-
-
-
Field Detail
-
clientSet_
private final ClientSet clientSet_
-
BASE_MTYPE
private static final java.lang.String BASE_MTYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MetaQueryMessageHandler
public MetaQueryMessageHandler(ClientSet clientSet)
Constructor.- Parameters:
clientSet
- hub client set object
-
-
Method Detail
-
processCall
public java.util.Map processCall(HubConnection conn, java.lang.String senderId, Message msg)
Description copied from class:AbstractMessageHandler
Implements message processing. Implementations should normally return a map which contains thesamp.result
part of the call response, that is the MType-specific return value name->value map. As a special case, returning null is equivalent to returning an empty map. However, ifAbstractMessageHandler.createResponse(java.util.Map)
is overridden, the return value semantics may be different.- Specified by:
processCall
in classAbstractMessageHandler
- Parameters:
conn
- hub connectionsenderId
- public ID of sender clientmsg
- message with MType this handler is subscribed to- Returns:
- result of handling this message; exact semantics determined
by
createResponse
implementation
-
-