public class MachineDialogParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.io.BufferedReader |
_incoming |
private java.io.PrintWriter |
_outgoing |
private static int |
BUFFER_SIZE |
private static org.apache.commons.logging.Log |
log |
private static java.util.Map<java.lang.String,Event.Log.Severity> |
LOG_SEVERITIES |
Constructor and Description |
---|
MachineDialogParser() |
Modifier and Type | Method and Description |
---|---|
private Event.Base |
_parseRequest(java.lang.String request,
java.io.OutputStream out) |
void |
cliAbort()
abort command.
|
void |
cliDownloadLog(java.io.OutputStream out)
log command.
|
java.lang.Object |
cliEnvironmentGet(java.lang.String name)
env-get command.
|
void |
cliEnvironmentSet(java.lang.String name,
java.lang.Object value)
env-set command.
|
void |
cliInstall()
install command.
|
void |
cliNoop()
noop command.
|
void |
cliQuit()
quit command.
|
Event.Base |
nextEvent()
Get next event from stream.
|
Event.Base |
nextEvent(java.io.OutputStream out)
Get next event from stream.
|
void |
sendResponse(Event.Base bevent)
Send response of an event.
|
void |
setStreams(java.io.InputStream incoming,
java.io.OutputStream outgoing)
Set the dialog streams.
|
private static final int BUFFER_SIZE
private static final org.apache.commons.logging.Log log
private static java.util.Map<java.lang.String,Event.Log.Severity> LOG_SEVERITIES
private java.io.BufferedReader _incoming
private java.io.PrintWriter _outgoing
private Event.Base _parseRequest(java.lang.String request, java.io.OutputStream out) throws java.lang.Exception
java.lang.Exception
public void setStreams(java.io.InputStream incoming, java.io.OutputStream outgoing)
incoming
- incoming stream.outgoing
- outgoing stream.public java.lang.Object cliEnvironmentGet(java.lang.String name) throws java.io.IOException
name
- variable name.java.io.IOException
- on unexpected connection terminationpublic void cliEnvironmentSet(java.lang.String name, java.lang.Object value) throws java.io.IOException
name
- variable name.value
- value to set, type of object is attached (null, Integer, String, String[]).java.io.IOException
- on unexpected connection terminationpublic void cliDownloadLog(java.io.OutputStream out) throws java.io.IOException
out
- stream to write log into.java.io.IOException
- on unexpected connection terminationpublic void cliNoop() throws java.io.IOException
java.io.IOException
- on unexpected connection terminationpublic void cliQuit() throws java.io.IOException
java.io.IOException
- on unexpected connection terminationpublic void cliInstall() throws java.io.IOException
java.io.IOException
- on unexpected connection terminationpublic void cliAbort() throws java.io.IOException
java.io.IOException
- on unexpected connection terminationpublic Event.Base nextEvent(java.io.OutputStream out) throws java.io.IOException, SoftError
out
- output stream for multistring display.java.io.IOException
- on unexpected connection terminationSoftError
public Event.Base nextEvent() throws java.io.IOException
java.io.IOException
- on unexpected connection terminationpublic void sendResponse(Event.Base bevent)
bevent
- event that holds the response.