public abstract class InputModule extends ForwarderModule.Abstract implements ServiceThread.Target
Modifier and Type | Class and Description |
---|---|
protected static class |
InputModule.AbstractInput
Abstract input.
|
protected static interface |
InputModule.ModuleInput
Module input.
|
ForwarderModule.Abstract.AbstractInputOutput, ForwarderModule.Abstract.ModuleInputOutput
ForwarderModule.Abstract
Constructor and Description |
---|
InputModule() |
Modifier and Type | Method and Description |
---|---|
protected int |
getDefaultBatchLimit()
Gets the default batch limit.
|
protected InputModule.ModuleInput |
getInput()
Gets the input.
|
protected boolean |
output(Serializable[] messages)
Outputs messages.
|
void |
run()
Runs.
|
protected void |
setInput(InputModule.ModuleInput input)
Sets the input.
|
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 final void run() throws InterruptedException
Similar to same in Runnable but may throw exceptions.
run
in interface ServiceThread.Target
InterruptedException
public void start()
start
in interface ForwarderModule
public void stop()
stop
in interface ForwarderModule
public void tearDown()
tearDown
in interface ForwarderModule
tearDown
in class ForwarderModule.Abstract
protected int getDefaultBatchLimit()
getDefaultBatchLimit
in class ForwarderModule.Abstract
@Nonnull @CheckReturnValue protected final InputModule.ModuleInput getInput()
@CheckReturnValue protected final boolean output(@Nonnull Serializable[] messages) throws InterruptedException, ServiceNotAvailableException
messages
- The messages.InterruptedException
- When the module input is stopped.ServiceNotAvailableException
- When the service is not available.protected final void setInput(@Nonnull InputModule.ModuleInput input)
input
- The input.protected boolean setUp(KeyedGroups moduleProperties)
setUp
in class ForwarderModule.Abstract
moduleProperties
- The module properties.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.