public class Daemon extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Daemon.MessageHandler
Callback interface used by clients to receive messages and errors.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Daemon(File inPipe,
File outPipe,
Daemon.MessageHandler handler)
Connect on existing pipes, without starting a child process.
|
|
Daemon(String pathToExecutable,
Daemon.MessageHandler handler,
String workingDir,
KinesisProducerConfiguration config,
Map<String,String> environmentVariables)
Starts up the child process, connects to it, and beings sending and
receiving messages.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.amazonaws.services.kinesis.producer.protobuf.Messages.Message m)
Enqueue a message to be sent to the child process.
|
void |
destroy()
Immediately kills the child process and shuts down the threads in this
Daemon.
|
Daemon.MessageHandler |
getHandler() |
File |
getInPipe() |
File |
getOutPipe() |
String |
getPathToExecutable() |
int |
getQueueSize() |
String |
getWorkingDir() |
public Daemon(String pathToExecutable, Daemon.MessageHandler handler, String workingDir, KinesisProducerConfiguration config, Map<String,String> environmentVariables)
pathToExecutable - Path to the binary that we will use to start up the child.handler - Message handler that handles messages received from the child.workingDir - Working directory. The KPL creates FIFO files; it will do so
in this directory.config - KPL configuration.protected Daemon(File inPipe, File outPipe, Daemon.MessageHandler handler)
inPipe - Pipe from which we read messages from the child.outPipe - Pipe into which we write messages to the child.handler - Message handler.public void add(com.amazonaws.services.kinesis.producer.protobuf.Messages.Message m)
m - public void destroy()
public File getInPipe()
public File getOutPipe()
public String getPathToExecutable()
public Daemon.MessageHandler getHandler()
public String getWorkingDir()
public int getQueueSize()
Copyright © 2018. All rights reserved.