T - P - public abstract class AbstractMessageBus<T,P extends IMessageBus.IPostCommand> extends Object implements IMessageBus<T,P>
IMessageBus.IPostCommand<T>| Constructor and Description |
|---|
AbstractMessageBus(BusConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected MessagePublication |
addAsynchronousDeliveryRequest(MessagePublication request) |
protected MessagePublication |
addAsynchronousDeliveryRequest(MessagePublication request,
long timeout,
TimeUnit unit) |
void |
addErrorHandler(IPublicationErrorHandler handler)
Publication errors may occur at various points of time during message delivery.
|
protected void |
finalize() |
Executor |
getExecutor()
Get the executor service that is used to asynchronous message publication.
|
Collection<IPublicationErrorHandler> |
getRegisteredErrorHandlers()
Returns an immutable collection containing all the registered error handlers
|
protected Collection<Subscription> |
getSubscriptionsByMessageType(Class messageType) |
void |
handlePublicationError(PublicationError error) |
boolean |
hasPendingMessages()
Check whether any asynchronous message publications are pending for being processed
|
void |
subscribe(Object listener)
Subscribe all listeners of the given message to receive message publications.
|
boolean |
unsubscribe(Object listener)
Immediately remove all registered message handlers (if any) of the given listener.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostpublic AbstractMessageBus(BusConfiguration configuration)
public Collection<IPublicationErrorHandler> getRegisteredErrorHandlers()
IMessageBusgetRegisteredErrorHandlers in interface IMessageBus<T,P extends IMessageBus.IPostCommand>public boolean unsubscribe(Object listener)
IMessageBusunsubscribe in interface IMessageBus<T,P extends IMessageBus.IPostCommand>public void subscribe(Object listener)
IMessageBussubscribe in interface IMessageBus<T,P extends IMessageBus.IPostCommand>public void addErrorHandler(IPublicationErrorHandler handler)
IMessageBusaddErrorHandler in interface IMessageBus<T,P extends IMessageBus.IPostCommand>protected MessagePublication addAsynchronousDeliveryRequest(MessagePublication request)
protected MessagePublication addAsynchronousDeliveryRequest(MessagePublication request, long timeout, TimeUnit unit)
protected Collection<Subscription> getSubscriptionsByMessageType(Class messageType)
public void handlePublicationError(PublicationError error)
protected void finalize()
throws Throwable
public boolean hasPendingMessages()
IMessageBushasPendingMessages in interface IMessageBus<T,P extends IMessageBus.IPostCommand>public Executor getExecutor()
IMessageBusgetExecutor in interface IMessageBus<T,P extends IMessageBus.IPostCommand>Copyright © 2013. All Rights Reserved.