|
SolarMetric Kodo JDO 3.1.6 generated on August 25 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.solarmetric.remote.CommandIO
Manages command input and output.
Constructor Summary | |
CommandIO()
Default constructor. |
|
CommandIO(ContextFactory context,
Log log)
Constructor. |
Method Summary | |
boolean |
execute(Transport.Channel channel)
Execute a command via the given channel. |
ContextFactory |
getContextFactory()
A context factory to use to given executed commands context. |
Log |
getLog()
A log to write about sent and recieved a commands. |
protected Command |
readType(ObjectInput in)
Read the command type from the given stream and return a new command of the proper type. |
void |
send(Command cmd,
Transport.Channel channel)
Send a command via the given channel. |
void |
setContextFactory(ContextFactory context)
A context factory to use to given executed commands context. |
void |
setLog(Log log)
A log to write about sent and recieved a commands. |
void |
test(Transport.Channel channel)
Test that the given client channel is still connected. |
protected void |
writeType(Command cmd,
ObjectOutput out)
Write the type of this command to the given stream so that readType(java.io.ObjectInput) will be able to reconstruct the command. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CommandIO()
public CommandIO(ContextFactory context, Log log)
Method Detail |
public Log getLog()
public void setLog(Log log)
public ContextFactory getContextFactory()
public void setContextFactory(ContextFactory context)
public boolean execute(Transport.Channel channel)
TransportException
- on transport errorpublic void send(Command cmd, Transport.Channel channel) throws Exception
TransportException
- on transport errorException
- if the command caused an error on the serverpublic void test(Transport.Channel channel) throws Exception
protected Command readType(ObjectInput in) throws Exception
protected void writeType(Command cmd, ObjectOutput out) throws Exception
readType(java.io.ObjectInput)
will be able to reconstruct the command. By default,
this method writes the command class name to the stream.
|
SolarMetric Kodo JDO 3.1.6 generated on August 25 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |