Class AbstractMessageHandler

java.lang.Object
org.astrogrid.samp.client.AbstractMessageHandler
All Implemented Interfaces:
MessageHandler

public abstract class AbstractMessageHandler extends Object implements MessageHandler
Partial implementation of MessageHandler interface which helps to ensure correct client behaviour. Concrete subclasses just need to specify the MTypes they subscribe to and implement the processCall(org.astrogrid.samp.client.HubConnection, java.lang.String, org.astrogrid.samp.Message) method.
Since:
16 Jul 2008
Author:
Mark Taylor
  • Constructor Details

    • AbstractMessageHandler

      protected AbstractMessageHandler(Map subscriptions)
      Constructor using a given subscriptions map.
      Parameters:
      subscriptions - Subscriptions-like map defining which MTypes this handler can process
    • AbstractMessageHandler

      protected AbstractMessageHandler(String[] mtypes)
      Constructor using a given list of subscribed MTypes.
      Parameters:
      mtypes - list of MTypes which this handler can process
    • AbstractMessageHandler

      protected AbstractMessageHandler(String mtype)
      Constructor using a single subscribed MType.
      Parameters:
      mtype - single MType which this handler can process
  • Method Details