public class ControlCommandMarshaller extends Object
XControlCommand
into a String
representation. It uses Java Bean Introspection to identify the serialization format.ControlCommandUnmarshaller
Constructor and Description |
---|
ControlCommandMarshaller() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
marshalCommand(XControlCommand command)
Marshaling the given command object into a String by looking at the bean properties.
|
public static byte[] marshalCommand(XControlCommand command) throws OperationNotSupportedException
Marshaling the given command object into a String by looking at the bean properties. The
marshaling is done in such a manner that it can be re-constructed by the
ControlCommandUnmarshaller
. It uses the bean introspection to determine the fields
which needs to be considered in marshaling.
This uses the following protocol to do the marshaling; Say the command is
DoOperationXCommand
and there are 2 properties of type String
and int
named param1 and param2 respectively having values value1 and value2.
The string marshaled version of the above command will be;
DoOperationX#param1=value1;param2=value2
command
- the ControlCommand to be marshaled into a StringOperationNotSupportedException
- if there are complex types in the Command beanCopyright © 2016–2019 AdroitLogic. All rights reserved.