com.symphony.bdk.bot.sdk.event.EventDispatcher Maven / Gradle / Ivy
package com.symphony.bdk.bot.sdk.event;
import com.symphony.bdk.bot.sdk.event.model.BaseEvent;
/**
* Dispatches events to corresponding {@link EventHandler}
*
* @author Marcus Secato
*
*/
public interface EventDispatcher {
/**
* Registers a {@link BaseEventHandler} for the given channel (aka event
* name).
*
* @param the event type
* @param channel the channel name to register to
* @param handler the handler for the specified channel
*/
void register(String channel,
BaseEventHandler handler);
/**
* Dispatch the event pushed by the {@link InternalEventListener} to the
* corresponding {@link BaseEventHandler}.
*
* @param the event type
* @param channel the channel to push events to
* @param event the event triggered in Symphony
*/
void push(String channel, E event);
}