|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.msi.network.server.RequestHandler
com.msi.network.server.CommandProcessor
Control the flow of processing server commands. These commands are considered to arrive one line at a time, but may span multiple lines. Access to lines of data are provided by the Connection object and termination of multi-line commands is implemented by each command.
Commands are processed sequentially until a match is made. A match indicates that command processing is complete and the response has been sent.
Setup requires:
| Field Summary | |
protected java.util.Vector |
_commands
Describe variable _commands here. |
protected java.lang.String |
hello
When a client connects, this String is returned. |
protected java.lang.String |
noCommand
If the client sends an unsupported command, this String is returned. |
protected long |
readTO
Milliseconds to wait before closing the connection. |
| Fields inherited from class com.msi.network.server.RequestHandler |
conn |
| Constructor Summary | |
CommandProcessor()
|
|
| Method Summary | |
void |
addCommand(Command c)
Adds the specified command to the end of the list. |
java.lang.String |
getCommandHelp()
Scan the list of commands retrieving each help string. |
java.lang.String |
getHello()
Get the value of hello. |
java.lang.String |
getNoCommand()
Get the value of noCommand. |
long |
getReadTO()
Get the value of readTO. |
void |
insertCommand(Command c)
Insert the specified command at the beginning of the list. |
void |
processRequest()
Read a client command line and step through the command array. |
void |
setHello(java.lang.String v)
Set the value of hello. |
void |
setNoCommand(java.lang.String v)
Set the value of noCommand. |
void |
setReadTO(long v)
Set the value of readTO. |
java.lang.String |
toString()
Provide a debug string. |
| Methods inherited from class com.msi.network.server.RequestHandler |
run, setConnection |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected long readTO
protected java.lang.String hello
protected java.lang.String noCommand
protected java.util.Vector _commands
_commands here.
| Constructor Detail |
public CommandProcessor()
| Method Detail |
public void addCommand(Command c)
c - command to be added to the end of the list.public void insertCommand(Command c)
c - command to be added to the end of the list.
public void processRequest()
throws RHException
processRequest in class RequestHandlerRHException - if an error occurspublic java.lang.String getHello()
public void setHello(java.lang.String v)
v - Value to assign to hello.public java.lang.String getNoCommand()
public void setNoCommand(java.lang.String v)
v - Value to assign to noCommand.public java.lang.String getCommandHelp()
public java.lang.String toString()
public long getReadTO()
public void setReadTO(long v)
v - Value to assign to readTO.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||