public abstract class Command extends Object
execute()
is to be provided by subclasses to
do real application work.Constructor and Description |
---|
Command() |
Modifier and Type | Method and Description |
---|---|
abstract void |
execute()
Subclasses are to provide implementation of this method to get application-specific work done.
|
static <T extends Command> |
fromBytes(byte[] bytes) |
static <T extends Command> |
fromXml(String commandXml)
Method used by framework to de-serialize a command from XML.
|
String |
getJMSMessageID() |
void |
setJMSMessageID(String jmsMessageId) |
byte[] |
toBytes()
Flattens(serializes, dehydrates, etc.) this instance to a binary representation.
|
String |
toXml()
Serializes this object into XML.
|
public static <T extends Command> T fromXml(String commandXml)
commandXml
- XML representation of a command.commandXml
argument.public abstract void execute()
public final String toXml()
fromXml(String)
to de-serialize a command
after it passes through messaging broker.public byte[] toBytes() throws IOException
IOException
public static <T extends Command> T fromBytes(byte[] bytes) throws IOException
IOException
public String getJMSMessageID()
public void setJMSMessageID(String jmsMessageId)
Copyright © 2020 JavaLite. All rights reserved.