public interface AdaptrisConnection extends AdaptrisComponent, ComponentLifecycleExtension, StateManagedComponent
Represents a connection> to an application or of a protocol type. E.g. JMS, database, etc.
It is generally the responsibility of implementations of this interface to to deliver messages to
registered AdaptrisMessageConsumer instances.
ComponentLifecycleExtension to satisfy any underlying
pre-initialisation activities.| Modifier and Type | Method and Description |
|---|---|
void |
addExceptionListener(StateManagedComponent comp)
Add a component that will be notified upon exception.
|
void |
addMessageConsumer(AdaptrisMessageConsumer consumer)
Adds a
AdaptrisMessageConsumer to this connection's
internal store of message consumers. |
void |
addMessageProducer(AdaptrisMessageProducer producer)
Adds a
AdaptrisMessageProducer to this connection's
internal store of message producers. |
AdaptrisConnection |
cloneForTesting()
Make a copy of this object for test purposes.
|
ConnectionErrorHandler |
connectionErrorHandler()
Returns the currently active
ConnectionErrorHandler |
ConnectionErrorHandler |
getConnectionErrorHandler()
Returns the configured
ConnectionErrorHandler. |
<T> T |
retrieveConnection(java.lang.Class<T> type)
Return the connection as represented by this connection
|
java.util.Set<StateManagedComponent> |
retrieveExceptionListeners()
Return a collection of components that need to be restarted on exception.
|
java.util.Set<AdaptrisMessageConsumer> |
retrieveMessageConsumers()
Returns a
List of this connection's
AdaptrisMessageConsumers. |
java.util.Set<AdaptrisMessageProducer> |
retrieveMessageProducers()
Returns a
List of this connection's
AdaptrisMessageProducers. |
void |
setConnectionErrorHandler(ConnectionErrorHandler handler)
Sets the
ConnectionErrorHandler to use. |
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentStategetUniqueIdclose, init, start, stopjava.util.Set<StateManagedComponent> retrieveExceptionListeners()
ConnectionErrorHandlervoid addExceptionListener(StateManagedComponent comp)
comp - the component that will be notified.void addMessageProducer(AdaptrisMessageProducer producer) throws CoreException
Adds a AdaptrisMessageProducer to this connection's
internal store of message producers.
producer - the AdaptrisMessageProducer to addCoreException - wrapping any underlying Exceptionsjava.util.Set<AdaptrisMessageProducer> retrieveMessageProducers()
Returns a List of this connection's
AdaptrisMessageProducers.
List of this connection's
AdaptrisMessageProducersvoid addMessageConsumer(AdaptrisMessageConsumer consumer) throws CoreException
Adds a AdaptrisMessageConsumer to this connection's
internal store of message consumers.
consumer - the AdaptrisMessageConsumer to addCoreException - wrapping any underlying Exceptionsjava.util.Set<AdaptrisMessageConsumer> retrieveMessageConsumers()
Returns a List of this connection's
AdaptrisMessageConsumers.
List of this connection's
AdaptrisMessageConsumersvoid setConnectionErrorHandler(ConnectionErrorHandler handler)
ConnectionErrorHandler to use.ConnectionErrorHandler getConnectionErrorHandler()
ConnectionErrorHandler.ConnectionErrorHandler connectionErrorHandler()
ConnectionErrorHandlerConnectionErrorHandler, which may not be the same as the configured...<T> T retrieveConnection(java.lang.Class<T> type)
type - the type of connectionAdaptrisConnection cloneForTesting() throws CoreException
CoreException - wrapping any exceptions