Package org.ka2ddo.yaac.pluginapi
Class AbstractQueryHandler
java.lang.Object
org.ka2ddo.yaac.pluginapi.AbstractQueryHandler
- Direct Known Subclasses:
AlohaQueryHandler
,DirectQueryHandler
,HeardQueryHandler
,IGateQueryHandler
,LocalQueryHandler
,MessageQueryHandler
,ObjectRetransmitQueryHandler
,PingQueryHandler
,PositionQueryHandler
,QueriesQueryHandler
,StatusQueryHandler
,UptimeQueryHandler
,VersionQueryHandler
,WeatherQueryHandler
,YDebugQueryHandler
This class defines some infrastructure for convenient creation of pluggable query handlers
for YAAC. New query codes may be defined by plugins and registered with the QueryResponder.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor for this abstract superclass. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
handleQuery
(Message mm) Handle the passed in message and generate whatever appropriate response should be made.protected static void
transmitReply
(Message mm, String answer) Convenience method to help subclass implementations send responses to the requesting station.
-
Constructor Details
-
AbstractQueryHandler
protected AbstractQueryHandler()Constructor for this abstract superclass.
-
-
Method Details
-
handleQuery
Handle the passed in message and generate whatever appropriate response should be made.- Parameters:
mm
- MessageMessage addressed explicitly to local station whose content begins with one of the prefixes specified by the subclass.
-
transmitReply
Convenience method to help subclass implementations send responses to the requesting station.- Parameters:
mm
- the originating MessageMessage that caused the query to be processedanswer
- the text string to embed in a response MessageMessage to send back to the requester
-