public class MessageDispatcherImpl extends Object implements IMessageDispatcher
| Modifier | Constructor and Description |
|---|---|
protected |
MessageDispatcherImpl(String id) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addToWorkerPool(ChannelWorker worker) |
protected void |
checkTimeoutWorker() |
protected Future<IOnMessageStoreResult> |
createFutureOfScheduleResult(PublishMessageResultImpl scheduleResult) |
PropertyBlockImpl |
createPropertyBlock()
factory-methode creating instance of
IPropertyBlock |
void |
dispose()
Remove all workers and clean resources.
|
protected void |
executeOnChannelDetach(IOnChannelDetach onChannelDetach,
IChannel<?> channel) |
void |
executeOnTaskStopExecuter(ChannelWorker worker,
IChannelTask task) |
protected void |
executeOnTaskTimeOut(IOnTaskTimeout manager,
IChannel<?> channel,
IChannelTask task) |
IChannel<?> |
getChannel(String channelId)
getter to request for
IChannel with given id |
List<String> |
getChannelIdList()
request for all
IChannel-IDs |
protected ChannelWorker |
getFromWorkerPool() |
String |
getId()
getter for id of dispatcher.
|
IPropertyBlock |
getPropertyBlock()
getter for propertyblock of dispatcher
|
<T> IChannel<T> |
getTypedChannel(String channelId,
Class<T> messageType) |
protected void |
logError(String message,
Throwable throwable) |
protected void |
onConfigurationModify(ChannelImpl<?> channel,
String... attributes) |
void |
registerChannelManager(IChannelManager channelManager) |
void |
registerChannelService(IChannelService channelService) |
protected void |
registerTimeOut(ChannelImpl<?> channel,
TaskContainer taskContainer) |
protected SpooledChannelWorker |
scheduleChannelWorker(ChannelImpl<?> channel,
long wakeUpTime) |
<T> void |
sendMessage(String channelId,
T message)
queue a message to addressed queue
|
void |
unregisterChannelManager(IChannelManager channelManager) |
void |
unregisterChannelService(IChannelService channelService) |
protected void |
unregisterTimeOut(ChannelImpl<?> channel,
TaskContainer taskContainer) |
protected MessageDispatcherImpl(String id)
public String getId()
IMessageDispatchergetId in interface IMessageDispatcherpublic <T> void sendMessage(String channelId, T message)
IMessageDispatchersendMessage in interface IMessageDispatcherchannelId - id of IChannelmessage - message to queuepublic List<String> getChannelIdList()
IMessageDispatcherIChannel-IDsgetChannelIdList in interface IMessageDispatcherList with queueIdspublic IChannel<?> getChannel(String channelId)
IMessageDispatcherIChannel with given idgetChannel in interface IMessageDispatcherchannelId - id for queueIChannel registered with queueIdpublic <T> IChannel<T> getTypedChannel(String channelId, Class<T> messageType)
getTypedChannel in interface IMessageDispatcherprotected void registerTimeOut(ChannelImpl<?> channel, TaskContainer taskContainer)
protected void unregisterTimeOut(ChannelImpl<?> channel, TaskContainer taskContainer)
public void dispose()
IMessageDispatcherdispose in interface IMessageDispatcherpublic void registerChannelManager(IChannelManager channelManager)
registerChannelManager in interface IMessageDispatcherpublic void unregisterChannelManager(IChannelManager channelManager)
unregisterChannelManager in interface IMessageDispatcherpublic void registerChannelService(IChannelService channelService)
registerChannelService in interface IMessageDispatcherpublic void unregisterChannelService(IChannelService channelService)
unregisterChannelService in interface IMessageDispatcherpublic PropertyBlockImpl createPropertyBlock()
IMessageDispatcherIPropertyBlockcreatePropertyBlock in interface IMessageDispatcherIPropertyBlockprotected boolean addToWorkerPool(ChannelWorker worker)
protected ChannelWorker getFromWorkerPool()
protected void checkTimeoutWorker()
protected SpooledChannelWorker scheduleChannelWorker(ChannelImpl<?> channel, long wakeUpTime)
protected void executeOnTaskTimeOut(IOnTaskTimeout manager, IChannel<?> channel, IChannelTask task)
public void executeOnTaskStopExecuter(ChannelWorker worker, IChannelTask task)
protected void executeOnChannelDetach(IOnChannelDetach onChannelDetach, IChannel<?> channel)
protected Future<IOnMessageStoreResult> createFutureOfScheduleResult(PublishMessageResultImpl scheduleResult)
protected void onConfigurationModify(ChannelImpl<?> channel, String... attributes)
public IPropertyBlock getPropertyBlock()
IMessageDispatchergetPropertyBlock in interface IMessageDispatcherIPropertyBlock of dispatcherCopyright © 2020. All rights reserved.