Class RTMEventHandler<E extends Event>

java.lang.Object
com.slack.api.rtm.RTMEventHandler<E>
Type Parameters:
E - The type of an events API Payload

public abstract class RTMEventHandler<E extends Event>
extends java.lang.Object
Real Time Messaging API event handler base class.
  • Constructor Summary

    Constructors 
    Constructor Description
    RTMEventHandler()  
  • Method Summary

    Modifier and Type Method Description
    void acceptUntypedObject​(java.lang.Object event)
    Used only internally.
    java.lang.Class<E> getEventClass()
    Returns the Class object of the Event implementation.
    java.lang.String getEventSubType()
    Returns the subtype value of the event (e.g., MessageEvent.TYPE_NAME)
    java.lang.String getEventType()
    Returns the type value of the event (e.g., MessageEvent.TYPE_NAME)
    abstract void handle​(E event)
    Implement your logic in this method.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getEventType

      public java.lang.String getEventType()
      Returns the type value of the event (e.g., MessageEvent.TYPE_NAME)
    • getEventSubType

      public java.lang.String getEventSubType()
      Returns the subtype value of the event (e.g., MessageEvent.TYPE_NAME)
    • getEventClass

      public java.lang.Class<E> getEventClass()
      Returns the Class object of the Event implementation.
    • handle

      public abstract void handle​(E event)
      Implement your logic in this method.
      Parameters:
      event - event data
    • acceptUntypedObject

      public void acceptUntypedObject​(java.lang.Object event)
      Used only internally.
      Parameters:
      event - event data