public class ReplyDescriptorImpl extends Object implements Reply, Serializable
InstanceIdAccessor.InstanceIdMutator, InstanceIdAccessor.InstanceIdProperty
SessionIdAccessor.SessionIdMutator, SessionIdAccessor.SessionIdProperty
org.refcodes.exception.ExceptionAccessor.ExceptionMutator<E>, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<E extends Throwable>
Modifier | Constructor and Description |
---|---|
|
ReplyDescriptorImpl()
Creates a
Reply instance. |
|
ReplyDescriptorImpl(Object aReturnValue,
Throwable aException,
MethodRequest aMethodRequestDescriptor)
Creates a
Reply instance. |
|
ReplyDescriptorImpl(Object aReturnValue,
Throwable aException,
String aInstanceId,
String aSessionId)
Creates a
Reply instance. |
protected |
ReplyDescriptorImpl(String sessionId)
Creates a
Reply instance. |
|
ReplyDescriptorImpl(String instanceId,
String sessionId)
Creates a
Reply instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
clear()
Same as
Clearable.clear() . |
Throwable |
getException() |
String |
getInstanceId()
Retrieves the instance ID from the instance ID property.
|
Object |
getReturnValue()
Returns the return value of a method call.
|
String |
getSessionId()
Retrieves the sessionId from the session ID property.
|
boolean |
hasReply()
Returns true if this reply is not empty and waiting to be feeded with a
reply.
|
boolean |
isException()
Returns true if the reply carries an exception which occurred when
executing the method call.
|
boolean |
isReturnValue()
Returns true if the reply carries a valid return value.
|
void |
setException(Throwable aException) |
protected void |
setHasReply(boolean hasReply) |
protected void |
setInstanceId(String instanceId) |
protected void |
setMethodReplyDescriptor(Reply methodReplyDescriptor) |
void |
setReply(Reply methodReply)
Sets a reply.
|
void |
setReturnValue(Object returnValue) |
protected void |
setSessionId(String sessionId) |
public ReplyDescriptorImpl()
Reply
instance.public ReplyDescriptorImpl(Object aReturnValue, Throwable aException, MethodRequest aMethodRequestDescriptor)
Reply
instance.aReturnValue
- The return value; if any regular return then no
exception must be set.aException
- The exception in case an exception occurred (then there
must not be a return value).aMethodRequestDescriptor
- The MethodRequest
describing the according method request.public ReplyDescriptorImpl(Object aReturnValue, Throwable aException, String aInstanceId, String aSessionId)
Reply
instance.aReturnValue
- The return value; if any regular return then no
exception must be set.aException
- The exception in case an exception occurred (then there
must not be a return value).aInstanceId
- The instance ID in question.aSessionId
- The session ID in question.public ReplyDescriptorImpl(String instanceId, String sessionId)
Reply
instance.instanceId
- Description is currently not available!sessionId
- Description is currently not available!IllegalArgumentPredictableException
- Documentation currently not
availablepublic String getInstanceId()
InstanceIdAccessor
getInstanceId
in interface InstanceIdAccessor
public Object getReturnValue()
Reply
getReturnValue
in interface Reply
public String getSessionId()
SessionIdAccessor
getSessionId
in interface SessionIdAccessor
public Throwable getException()
getException
in interface org.refcodes.exception.ExceptionAccessor<Throwable>
public boolean hasReply()
Reply
public boolean isReturnValue()
Reply
isReturnValue
in interface Reply
public boolean isException()
Reply
isException
in interface Reply
public void setReply(Reply methodReply)
Reply
public void setReturnValue(Object returnValue)
setReturnValue
in interface Reply
returnValue
- Description is currently not available!public void setException(Throwable aException)
setException
in interface org.refcodes.exception.ExceptionAccessor.ExceptionMutator<Throwable>
setException
in interface Reply
protected void setHasReply(boolean hasReply)
hasReply
- Description is currently not available!protected void setInstanceId(String instanceId)
instanceId
- Description is currently not available!protected void setMethodReplyDescriptor(Reply methodReplyDescriptor)
methodReplyDescriptor
- Description is currently not available!protected void setSessionId(String sessionId)
sessionId
- Description is currently not available!protected void clear()
Clearable.clear()
.Copyright © 2015. All rights reserved.