Package com.adaptris.interlok.nats
Class NatsConnection
java.lang.Object
com.adaptris.core.AdaptrisConnectionImp
com.adaptris.core.AllowsRetriesConnection
com.adaptris.interlok.nats.NatsConnection
- All Implemented Interfaces:
AdaptrisComponent,AdaptrisConnection,ComponentLifecycle,ComponentLifecycleExtension,StateManagedComponent
- Direct Known Subclasses:
BasicNatsConnection,NatsConnectionFromProperties
-
Field Summary
Fields inherited from class com.adaptris.core.AdaptrisConnectionImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.nats.client.Connectionvoidclose(io.nats.client.Dispatcher dispatcher) protected voidprotected abstract io.nats.client.Connectionconnect()protected abstract Stringio.nats.client.DispatchercreateDispatcher(io.nats.client.MessageHandler handler) protected <T extends Exception>
voidexceedsMaxAttempts(int attemptCount, T e) protected voidprotected voidprotected voidprotected void<T extends NatsConnection>
TwithConnectionRetries(int i, TimeInterval t) Methods inherited from class com.adaptris.core.AllowsRetriesConnection
connectionAttempts, connectionRetryInterval, createLoggingStatement, getConnectionAttempts, getConnectionRetryInterval, logWarning, setConnectionAttempts, setConnectionRetryIntervalMethods inherited from class com.adaptris.core.AdaptrisConnectionImp
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
-
Constructor Details
-
NatsConnection
public NatsConnection()
-
-
Method Details
-
prepareConnection
- Specified by:
prepareConnectionin classAdaptrisConnectionImp- Throws:
CoreException
-
initConnection
- Specified by:
initConnectionin classAdaptrisConnectionImp- Throws:
CoreException
-
startConnection
- Specified by:
startConnectionin classAdaptrisConnectionImp- Throws:
CoreException
-
stopConnection
protected void stopConnection()- Specified by:
stopConnectionin classAdaptrisConnectionImp
-
closeConnection
protected void closeConnection()- Specified by:
closeConnectionin classAdaptrisConnectionImp
-
clientConnection
- Throws:
Exception
-
createDispatcher
public io.nats.client.Dispatcher createDispatcher(io.nats.client.MessageHandler handler) throws Exception - Throws:
Exception
-
close
public void close(io.nats.client.Dispatcher dispatcher) -
connect
- Throws:
Exception
-
connectionName
-
exceedsMaxAttempts
- Throws:
T extends Exception
-
withConnectionRetries
-