Package com.adaptris.core
Interface ConnectionErrorHandler
-
- All Superinterfaces:
ComponentLifecycle
- All Known Implementing Classes:
ActiveJmsConnectionErrorHandler
,ChannelCloseErrorHandler
,ConnectionErrorHandlerImp
,JmsConnectionErrorHandler
,JmsConnectionErrorHandlerImpl
,NullConnectionErrorHandler
public interface ConnectionErrorHandler extends ComponentLifecycle
Implementations of this class encapsualte behaviour that is invoked when an
Exception
relating to a connection is encountered.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
allowedInConjunctionWith(ConnectionErrorHandler ceh)
Is this error handler allowed to work with this error handler.void
handleConnectionException()
Handle the error.void
registerConnection(AdaptrisConnection connection)
Sets theAdaptrisConnection
to handle errors for.<T> T
retrieveConnection(java.lang.Class<T> type)
Return this components underlying connection.-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
-
-
-
Method Detail
-
registerConnection
void registerConnection(AdaptrisConnection connection)
Sets the
AdaptrisConnection
to handle errors for.- Parameters:
connection
- theAdaptrisConnection
to handle errors for
-
retrieveConnection
<T> T retrieveConnection(java.lang.Class<T> type)
Return this components underlying connection.- Parameters:
type
- the type of connection- Returns:
- the connection
-
allowedInConjunctionWith
boolean allowedInConjunctionWith(ConnectionErrorHandler ceh)
Is this error handler allowed to work with this error handler.- Parameters:
ceh
- other error handler.- Returns:
- true if the two error handlers can work together.
-
handleConnectionException
void handleConnectionException()
Handle the error.
-
-