public class NonBlockingChannelStartStrategy extends DefaultChannelLifecycleStrategy
This strategy attempts to start each channel in a non-blocking manner through the use of an ExecutorService
for each
channel.
If this strategy is chosen then it is possible that AdapterLifecycleEvent
s will be generated that do not accurately
reflect the internal state of the Adapter.
In the adapter configuration file this class is aliased as non-blocking-channel-start-strategy which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
NonBlockingChannelStartStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
close(java.util.List<Channel> channels)
Close a list of channels.
|
void |
init(java.util.List<Channel> channels)
Initialise a list of channels.
|
void |
start(java.util.List<Channel> channels)
Start a list of channels.
|
void |
stop(java.util.List<Channel> channels)
Stop a list of channels.
|
public void start(java.util.List<Channel> channels) throws CoreException
ChannelLifecycleStrategy
start
in interface ChannelLifecycleStrategy
start
in class DefaultChannelLifecycleStrategy
channels
- a list of channels that have already been initialised.CoreException
- wrapping any underlying exception.ChannelLifecycleStrategy.start(java.util.List)
public void init(java.util.List<Channel> channels) throws CoreException
ChannelLifecycleStrategy
init
in interface ChannelLifecycleStrategy
init
in class DefaultChannelLifecycleStrategy
channels
- a list of channels that require initialising.CoreException
- wrapping any underlying exception.ChannelLifecycleStrategy.init(java.util.List)
public void stop(java.util.List<Channel> channels)
ChannelLifecycleStrategy
stop
in interface ChannelLifecycleStrategy
stop
in class DefaultChannelLifecycleStrategy
channels
- a list of channels that have previously been started.ChannelLifecycleStrategy.stop(java.util.List)
public void close(java.util.List<Channel> channels)
ChannelLifecycleStrategy
close
in interface ChannelLifecycleStrategy
close
in class DefaultChannelLifecycleStrategy
channels
- a list of channels.ChannelLifecycleStrategy.close(java.util.List)