Package com.adaptris.core
Class ConnectionErrorHandlerImp
- java.lang.Object
-
- com.adaptris.core.ConnectionErrorHandlerImp
-
- All Implemented Interfaces:
ComponentLifecycle
,ConnectionErrorHandler
- Direct Known Subclasses:
ChannelCloseErrorHandler
,JmsConnectionErrorHandlerImpl
,NullConnectionErrorHandler
public abstract class ConnectionErrorHandlerImp extends java.lang.Object implements ConnectionErrorHandler
Behaviour common to
ConnectionErrorHandler
s.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description ConnectionErrorHandlerImp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowedInConjunctionWith(ConnectionErrorHandler ceh)
Is this error handler allowed to work with this error handler.protected java.util.List<Channel>
getRegisteredChannels()
void
registerConnection(AdaptrisConnection connection)
Sets theAdaptrisConnection
to handle errors for.protected void
restartAffectedComponents()
Standard functionality to restart the owner of the connection.<T> T
retrieveConnection(java.lang.Class<T> type)
Return this components underlying connection.protected long
retryWaitTimeMs()
Milliseconds to wait for before retrying a restart.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Methods inherited from interface com.adaptris.core.ConnectionErrorHandler
handleConnectionException
-
-
-
-
Method Detail
-
registerConnection
public void registerConnection(AdaptrisConnection connection)
Description copied from interface:ConnectionErrorHandler
Sets the
AdaptrisConnection
to handle errors for.- Specified by:
registerConnection
in interfaceConnectionErrorHandler
- Parameters:
connection
- theAdaptrisConnection
to handle errors for
-
retrieveConnection
public <T> T retrieveConnection(java.lang.Class<T> type)
Description copied from interface:ConnectionErrorHandler
Return this components underlying connection.- Specified by:
retrieveConnection
in interfaceConnectionErrorHandler
- Parameters:
type
- the type of connection- Returns:
- the connection
-
allowedInConjunctionWith
public boolean allowedInConjunctionWith(ConnectionErrorHandler ceh)
Description copied from interface:ConnectionErrorHandler
Is this error handler allowed to work with this error handler.- Specified by:
allowedInConjunctionWith
in interfaceConnectionErrorHandler
- Parameters:
ceh
- other error handler.- Returns:
- true if the two error handlers can work together.
-
retryWaitTimeMs
protected long retryWaitTimeMs()
Milliseconds to wait for before retrying a restart.
-
restartAffectedComponents
protected void restartAffectedComponents()
Standard functionality to restart the owner of the connection.
-
getRegisteredChannels
protected java.util.List<Channel> getRegisteredChannels()
-
-