de.sagd.u4etx.cis
Class CmdServiceMessage
java.lang.Object
|
+--de.sagd.u4etx.cis.AbstractServiceMessage
|
+--de.sagd.u4etx.cis.CmdServiceMessage
- All Implemented Interfaces:
- IServiceMessage
- public class CmdServiceMessage
- extends AbstractServiceMessage
This class encapsulates a cmd service message. You can create an instance
from this class and set all the values defined for an command request
(see entirex documentation).
Example
CmdServiceMessage cmd = new CmdServiceMessage();
cmd.setInterfaceVersion(InterfaceVersion.VERSION_1);
cmd.setObjectType(ObjectType.SERVER);
cmd.setCommand(Command.SHUTDOWN);
cmd.setOption(Option.IMMED);
...
All parameters are type-save (wrapped by classes). For every parameter
which has a range of allowed values (f.eg. ObjectType can be SERVER,
BROKER, WORKER, CLIENT, CONV, SERVICE, PSF), there are constants defined
(f.eg. ObjectType.SERVER). Every parameter where you can define a value
yourself, you have to instantiate manually (f.ef. new BlockLength(1024)).
You can pass this object directly to the ServiceRequest class which
knows how to get the bytes from the message and sends the request to
the broker.
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CmdServiceMessage
public CmdServiceMessage()
setCommand
public void setCommand(Command command)
setOption
public void setOption(Option option)
getMessage
public byte[] getMessage()
throws ServiceMessageException
checkCompleteness
protected void checkCompleteness()
throws ServiceMessageException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object