Package com.slack.api.rtm
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 Object
Real Time Messaging API event handler base class.
-
Constructor Summary
Constructors Constructor Description RTMEventHandler() -
Method Summary
Modifier and Type Method Description voidacceptUntypedObject(Object event)Used only internally.Class<E>getEventClass()Returns the Class object of the Event implementation.StringgetEventSubType()Returns the subtype value of the event (e.g., MessageEvent.TYPE_NAME)StringgetEventType()Returns the type value of the event (e.g., MessageEvent.TYPE_NAME)abstract voidhandle(E event)Implement your logic in this method.
-
Constructor Details
-
RTMEventHandler
public RTMEventHandler()
-
-
Method Details
-
getEventType
Returns the type value of the event (e.g., MessageEvent.TYPE_NAME) -
getEventSubType
Returns the subtype value of the event (e.g., MessageEvent.TYPE_NAME) -
getEventClass
Returns the Class object of the Event implementation. -
handle
Implement your logic in this method.- Parameters:
event- event data
-
acceptUntypedObject
Used only internally.- Parameters:
event- event data
-