public interface AdaptrisConnection extends AdaptrisComponent, ComponentLifecycleExtension, StateManagedComponent, JndiBindable
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
AdaptrisMessageConsumer s. |
java.util.Set<AdaptrisMessageProducer> |
retrieveMessageProducers()
Returns a
List of this connection's
AdaptrisMessageProducer s. |
void |
setConnectionErrorHandler(ConnectionErrorHandler handler)
Sets the
ConnectionErrorHandler to use. |
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
getUniqueId
close, init, start, stop
getLookupName
java.util.Set<StateManagedComponent> retrieveExceptionListeners()
ConnectionErrorHandler
void 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 Exception
sjava.util.Set<AdaptrisMessageProducer> retrieveMessageProducers()
Returns a List
of this connection's
AdaptrisMessageProducer
s.
List
of this connection's
AdaptrisMessageProducer
svoid 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 Exception
sjava.util.Set<AdaptrisMessageConsumer> retrieveMessageConsumers()
Returns a List
of this connection's
AdaptrisMessageConsumer
s.
List
of this connection's
AdaptrisMessageConsumer
svoid setConnectionErrorHandler(ConnectionErrorHandler handler)
ConnectionErrorHandler
to use.ConnectionErrorHandler getConnectionErrorHandler()
ConnectionErrorHandler
.ConnectionErrorHandler connectionErrorHandler()
ConnectionErrorHandler
ConnectionErrorHandler
, 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