public final class ForwarderServiceAppImpl extends ServiceAppImpl
Modifier and Type | Field and Description |
---|---|
static String |
MODULE_CLASS_PROPERTY
The class of the module to activate.
|
static String |
MODULE_PROPERTIES
Properties used to define a forwarder module.
|
SERVICE_APP_PROPERTIES
Constructor and Description |
---|
ForwarderServiceAppImpl() |
Modifier and Type | Method and Description |
---|---|
int |
getOutputsSize()
Gets the outputs size.
|
boolean |
onSignal(Signal signal)
Called when a signal has been received.
|
boolean |
output(Serializable[] messages)
Output messages.
|
boolean |
setUp(Service service)
Sets up the application.
|
void |
start()
Starts the application.
|
void |
stop()
Stops the application.
|
void |
tearDown()
Tears down the application.
|
createStats, fail, getConfig, getConfigProperties, getDataDir, getJoinTimeout, getProperties, getService, getSourceUUID, getThisLogger, getTimer, onAlert, onEvent, onServiceNotAvailableException, onServicesNotReady, onServicesReady
public static final String MODULE_CLASS_PROPERTY
public static final String MODULE_PROPERTIES
public int getOutputsSize()
public boolean onSignal(Signal signal)
Caution: this is called while synchronized on the service.
onSignal
in interface ServiceApp
onSignal
in class ServiceAppImpl
signal
- The signal.@CheckReturnValue public boolean output(@Nonnull Serializable[] messages) throws InterruptedException, ServiceNotAvailableException
messages
- The messages.InterruptedException
- When the service is stopped.ServiceNotAvailableException
- When the service is not available.public boolean setUp(Service service)
Overidden as needed.
Called by the framework and by overriding classes at the beginning of the override.
setUp
in interface ServiceApp
setUp
in class ServiceAppImpl
service
- The service holding this application.public void start()
Overidden as needed by the application.
Called by the framework.
Should return only when the application is started.
start
in interface ServiceApp
start
in class ServiceAppImpl
public void stop()
Overidden as needed by the application.
Called by the framework.
stop
in interface ServiceApp
stop
in class ServiceAppImpl
public void tearDown()
Overidden as needed by the application.
Called by the framework and by overriding classes at the end of the override.
tearDown
in interface ServiceApp
tearDown
in class ServiceAppImpl
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.