Package org.ovirt.otopi.dialog
Class MachineDialogParser
java.lang.Object
org.ovirt.otopi.dialog.MachineDialogParser
Machine dialog parser.
Please refer to README.dialog.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BufferedReaderprivate PrintWriterprivate static final intprivate static final org.apache.commons.logging.Logprivate static Map<String,Event.Log.Severity> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Event.Base_parseRequest(String request, OutputStream out) voidcliAbort()abort command.voidlog command.cliEnvironmentGet(String name) env-get command.voidcliEnvironmentSet(String name, Object value) env-set command.voidinstall command.voidcliNoop()noop command.voidcliQuit()quit command.Get next event from stream.nextEvent(OutputStream out) Get next event from stream.voidsendResponse(Event.Base bevent) Send response of an event.voidsetStreams(InputStream incoming, OutputStream outgoing) Set the dialog streams.
-
Field Details
-
BUFFER_SIZE
private static final int BUFFER_SIZE- See Also:
-
log
private static final org.apache.commons.logging.Log log -
LOG_SEVERITIES
-
_incoming
-
_outgoing
-
-
Constructor Details
-
MachineDialogParser
public MachineDialogParser()
-
-
Method Details
-
_parseRequest
- Throws:
Exception
-
setStreams
Set the dialog streams.- Parameters:
incoming- incoming stream.outgoing- outgoing stream.
-
cliEnvironmentGet
env-get command.- Parameters:
name- variable name.- Returns:
- variable value (null, Integer, String, String[])
- Throws:
IOException- on unexpected connection termination
-
cliEnvironmentSet
env-set command.- Parameters:
name- variable name.value- value to set, type of object is attached (null, Integer, String, String[]).- Throws:
IOException- on unexpected connection termination
-
cliDownloadLog
log command.- Parameters:
out- stream to write log into.- Throws:
IOException- on unexpected connection termination
-
cliNoop
noop command.- Throws:
IOException- on unexpected connection termination
-
cliQuit
quit command.- Throws:
IOException- on unexpected connection termination
-
cliInstall
install command.- Throws:
IOException- on unexpected connection termination
-
cliAbort
abort command.- Throws:
IOException- on unexpected connection termination
-
nextEvent
Get next event from stream.- Parameters:
out- output stream for multistring display.- Returns:
- Next event in stream.
- Throws:
IOException- on unexpected connection terminationSoftError
-
nextEvent
Get next event from stream.- Returns:
- Next event in stream.
- Throws:
IOException- on unexpected connection termination
-
sendResponse
Send response of an event.- Parameters:
bevent- event that holds the response.
-