|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.commandhandling.distributed.jgroups.ReplyMessage
public class ReplyMessage
JGroups Message representing a reply to a dispatched command.
Constructor Summary | |
---|---|
ReplyMessage()
Default constructor required by the Streamable and Externalizable interfaces. |
|
ReplyMessage(String commandIdentifier,
Object returnValue,
Throwable error,
Serializer serializer)
Constructs a message containing a reply to the command with given commandIdentifier , containing
either given returnValue or error , which uses the given serializer to
deserialize its contents. |
Method Summary | |
---|---|
String |
getCommandIdentifier()
Returns the identifier of the command for which this message is a reply. |
Throwable |
getError(Serializer serializer)
Returns the error of the command processing. |
Object |
getReturnValue(Serializer serializer)
Returns the returnValue of the command processing. |
boolean |
isSuccess()
Whether the reply message represents a successfully executed command. |
void |
readExternal(ObjectInput in)
|
void |
readFrom(DataInput in)
|
void |
writeExternal(ObjectOutput out)
|
void |
writeTo(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReplyMessage()
Streamable
and Externalizable
interfaces. Do not use
directly.
public ReplyMessage(String commandIdentifier, Object returnValue, Throwable error, Serializer serializer)
commandIdentifier
, containing
either given returnValue
or error
, which uses the given serializer
to
deserialize its contents.
commandIdentifier
- The identifier of the command to which the message is a replyreturnValue
- The return value of command processerror
- The error that occuered during event processing. When provided (i.e. not
null
, the given returnValue
is ignored.serializer
- The serializer to serialize the message contents withMethod Detail |
---|
public boolean isSuccess()
true
if this reply contains a return value, false
if it contains an error.public Object getReturnValue(Serializer serializer)
isSuccess()
return false
, this
method returns null
. This method also returns null
if response processing returned
a null
value.
serializer
- The serializer to deserialize the result with
public Throwable getError(Serializer serializer)
isSuccess()
return true
, this
method returns null
.
serializer
- The serializer to deserialize the result with
public String getCommandIdentifier()
public void writeTo(DataOutput out) throws IOException
writeTo
in interface org.jgroups.util.Streamable
IOException
public void readFrom(DataInput in) throws IOException
readFrom
in interface org.jgroups.util.Streamable
IOException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |