public final class PipeSink extends SinkModule.Abstract
This sink feeds values to an external program. It communicates with this program thru 'pipes' on the program's standard input ('stdin'), output ('stdout') and error ('stderr') streams.
The program is expected to loop on the requests until it receives a line containing a single field holding only the digit '0'.
SinkModule.Abstract
Modifier and Type | Field and Description |
---|---|
static String |
ARG_PROPERTY
An argument for the process.
|
static String |
CHARSET_PROPERTY
Specifies the java Charset to use instead of the local default for
communication with the external program.
|
static String |
COMMAND_PROPERTY
The operating system command used to activate the process.
|
static String |
DIRECTORY_PROPERTY
Specifies the working directory into which the external program should
execute.
|
static String |
HOLD_PROPERTY
The time in millis during which an idle external program will be held.
|
static String |
KILL_DELAY_PROPERTY
The delay before killing a process after closing its input.
|
static String |
NAME_PROPERTY
An identifying name for the pipe program.
|
static String |
PIPE_PROPERTIES
The pipe properties group.
|
static String |
PROGRAM_PROPERTY
The path to the program file.
|
static String |
SET_PROPERTY
Sets an environment variable.
|
Constructor and Description |
---|
PipeSink() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this sink.
|
boolean |
delete(VersionedValue versionedValue)
Deletes a value.
|
boolean |
setUp(SinkServiceAppImpl sinkAppImpl)
Sets up the sink for action.
|
void |
tearDown()
Tears down what has been set up.
|
boolean |
update(VersionedValue versionedValue)
Updates a value.
|
abort, getMetadata, getSinkAppImpl, getThisLogger, open
public static final String ARG_PROPERTY
public static final String CHARSET_PROPERTY
public static final String COMMAND_PROPERTY
public static final String DIRECTORY_PROPERTY
public static final String HOLD_PROPERTY
public static final String KILL_DELAY_PROPERTY
public static final String NAME_PROPERTY
public static final String PIPE_PROPERTIES
public static final String PROGRAM_PROPERTY
public static final String SET_PROPERTY
public void close()
close
in interface SinkModule
close
in class SinkModule.Abstract
public boolean delete(VersionedValue versionedValue)
delete
in interface SinkModule
delete
in class SinkModule.Abstract
versionedValue
- The point value to delete.public boolean setUp(SinkServiceAppImpl sinkAppImpl)
setUp
in interface SinkModule
setUp
in class SinkModule.Abstract
sinkAppImpl
- The sink application implementation.public void tearDown()
tearDown
in interface SinkModule
tearDown
in class SinkModule.Abstract
public boolean update(VersionedValue versionedValue)
update
in interface SinkModule
update
in class SinkModule.Abstract
versionedValue
- The new point value.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.