Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

    public abstract class AbstractQueryHandler

extends java.lang.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.

See Also:
  `Provider.runInitializersAfter()`, `QueryResponder.registerQueryHandler(String, AbstractQueryHandler)`

Constructor Summary
`AbstractQueryHandler()`

Method Summary
`abstract void` | `handleQuery(MessageMessage mm)` Handle the passed in message and generate whatever appropriate response should be made.
`protected static void` | `transmitReply(MessageMessage mm, java.lang.String answer)` Convenience method to help subclass implementations send responses to the requesting station.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractQueryHandler

    public AbstractQueryHandler()

Method Detail

### handleQuery

    public abstract void handleQuery(MessageMessage 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(MessageMessage mm,
                                        java.lang.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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD