public abstract class OutputModule extends ForwarderModule.Abstract
Modifier and Type | Class and Description |
---|---|
protected static class |
OutputModule.AbstractOutput
Abstract output.
|
protected static interface |
OutputModule.ModuleOutput
Module output.
|
ForwarderModule.Abstract.AbstractInputOutput, ForwarderModule.Abstract.ModuleInputOutput
ForwarderModule.Abstract
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BATCH_LIMIT
Default batch limit.
|
Constructor and Description |
---|
OutputModule() |
Modifier and Type | Method and Description |
---|---|
boolean |
commit()
Commits the messages transmission.
|
protected int |
getDefaultBatchLimit()
Gets the default batch limit.
|
protected boolean |
isAlone()
Asks if this module is alone.
|
protected void |
open(OutputModule.ModuleOutput output)
Opens the output.
|
boolean |
output(Serializable[] messages)
Outputs messages.
|
protected void |
setOutput(OutputModule.ModuleOutput output)
Sets the output.
|
protected boolean |
setUp(KeyedGroups moduleProperties)
Sets up this module.
|
void |
start()
Starts this module.
|
void |
stop()
Stops this module.
|
void |
tearDown()
Tears down what has been set up.
|
filter, getBatchControl, getConfig, getConfigProperties, getConnectionRetryDelay, getDefaultBatchWait, getForwarderAppImpl, getMetadata, getReliable, getService, getThisLogger, getTraces, isReliable, loadMetadata, needsMetadata, onMetadataRefreshed, setReliable, setUp
public static final int DEFAULT_BATCH_LIMIT
@CheckReturnValue public boolean commit() throws InterruptedException, ServiceNotAvailableException
InterruptedException
- When the service is stopped.ServiceNotAvailableException
- When the service is not available.@CheckReturnValue public boolean output(@Nonnull Serializable[] messages) throws InterruptedException, ServiceNotAvailableException
messages
- The messages.InterruptedException
- When the module output is stopped.ServiceNotAvailableException
- When the service is not available.public void start() throws InterruptedException, ServiceNotAvailableException
InterruptedException
- When appropriate.ServiceNotAvailableException
- When the service is not available.public void stop()
public void tearDown()
tearDown
in interface ForwarderModule
tearDown
in class ForwarderModule.Abstract
protected int getDefaultBatchLimit()
getDefaultBatchLimit
in class ForwarderModule.Abstract
protected final boolean isAlone()
protected final void open(@Nonnull OutputModule.ModuleOutput output) throws InterruptedException, ServiceNotAvailableException
output
- The output.InterruptedException
- When appropriate.ServiceNotAvailableException
- When the service is not available.protected final void setOutput(@Nonnull OutputModule.ModuleOutput output)
output
- The output.protected boolean setUp(KeyedGroups moduleProperties)
setUp
in class ForwarderModule.Abstract
moduleProperties
- The module properties.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.