Package net.engio.mbassy.subscription
Class SubscriptionContext
- java.lang.Object
-
- net.engio.mbassy.subscription.SubscriptionContext
-
- All Implemented Interfaces:
RuntimeProvider
public class SubscriptionContext extends java.lang.Object implements RuntimeProvider
The subscription context holds all (meta)data/objects that are relevant to successfully publish a message within a subscription. A one-to-one relation between a subscription and subscription context holds -> a subscription context is created for each distinct subscription managed by the subscription manager.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<IPublicationErrorHandler>
errorHandlers
private MessageHandler
handler
private BusRuntime
runtime
-
Constructor Summary
Constructors Constructor Description SubscriptionContext(BusRuntime runtime, MessageHandler handler, java.util.Collection<IPublicationErrorHandler> errorHandlers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<IPublicationErrorHandler>
getErrorHandlers()
Get the error handlers registered with the enclosing bus.MessageHandler
getHandler()
Get the meta data that specifies the characteristics of the message handler that is associated with this contextBusRuntime
getRuntime()
void
handleError(PublicationError error)
-
-
-
Field Detail
-
handler
private final MessageHandler handler
-
errorHandlers
private final java.util.Collection<IPublicationErrorHandler> errorHandlers
-
runtime
private final BusRuntime runtime
-
-
Constructor Detail
-
SubscriptionContext
public SubscriptionContext(BusRuntime runtime, MessageHandler handler, java.util.Collection<IPublicationErrorHandler> errorHandlers)
-
-
Method Detail
-
getHandler
public MessageHandler getHandler()
Get the meta data that specifies the characteristics of the message handler that is associated with this context
-
getErrorHandlers
public java.util.Collection<IPublicationErrorHandler> getErrorHandlers()
Get the error handlers registered with the enclosing bus.
-
getRuntime
public BusRuntime getRuntime()
- Specified by:
getRuntime
in interfaceRuntimeProvider
-
handleError
public final void handleError(PublicationError error)
-
-