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

public abstract class AbstractQueryHandler extends Object
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 Details

    • AbstractQueryHandler

      protected AbstractQueryHandler()
      Constructor for this abstract superclass.
  • Method Details

    • handleQuery

      public abstract void handleQuery(Message mm)
      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

      protected static void transmitReply(Message mm, String answer)
      Convenience method to help subclass implementations send responses to the requesting station.
      Parameters:
      mm - the originating MessageMessage that caused the query to be processed
      answer - the text string to embed in a response MessageMessage to send back to the requester