-
- All Superinterfaces:
org.refcodes.exception.ExceptionAccessor<Throwable>
,org.refcodes.exception.ExceptionAccessor.ExceptionMutator<Throwable>
,org.refcodes.exception.ExceptionAccessor.ExceptionProperty<Throwable>
,InstanceId
,org.refcodes.mixin.InstanceIdAccessor
,Session
,SessionIdAccessor
- All Known Subinterfaces:
CancelMethodReplyMessage
,MethodReplyMessage
,PublishSubjectReplyMessage
public interface Reply extends Session, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<Throwable>
The Interface Reply.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.exception.ExceptionAccessor
org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<EXC extends Throwable,B extends org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<EXC,B>>, org.refcodes.exception.ExceptionAccessor.ExceptionMutator<EXC extends Throwable>, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<EXC extends Throwable>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.InstanceIdAccessor
org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B extends org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B>>, org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty
-
Nested classes/interfaces inherited from interface org.refcodes.remoting.SessionIdAccessor
SessionIdAccessor.SessionIdBuilder<B extends SessionIdAccessor.SessionIdBuilder<B>>, SessionIdAccessor.SessionIdMutator, SessionIdAccessor.SessionIdProperty
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getReturnValue()
Returns the return value of a method call.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)
void
setReply(Reply methodReply)
Sets a reply.void
setReturnValue(Object returnValue)
Sets the return value.-
Methods inherited from interface org.refcodes.exception.ExceptionAccessor.ExceptionProperty
letException
-
Methods inherited from interface org.refcodes.remoting.SessionIdAccessor
getSessionId
-
-
-
-
Method Detail
-
getReturnValue
Object getReturnValue()
Returns the return value of a method call. To test first if the reply does not contain a Throwable object (exception occurred!) use the method isThrowable().- Returns:
- The return value of the method call (if any),
-
isException
boolean isException()
Returns true if the reply carries an exception which occurred when executing the method call.- Returns:
- True if this object contains an exception (Throwable object) instead of a return value.
-
isReturnValue
boolean isReturnValue()
Returns true if the reply carries a valid return value.- Returns:
- True if this object contains valid return value.
-
setReturnValue
void setReturnValue(Object returnValue)
Sets the return value.- Parameters:
returnValue
- Description is currently not available!
-
setReply
void setReply(Reply methodReply)
Sets a reply. The results (getThrowable(), getReturnValue()) from the provided reply are taken and set inside this instance. If this instance did not contain a reply before, then the method hasReply will return true from after this method call.- Parameters:
methodReply
- An object of type BlueprintMethodReply from which the replied values (throwable or return value) will be taken.
-
setException
void setException(Throwable aException)
- Specified by:
setException
in interfaceorg.refcodes.exception.ExceptionAccessor.ExceptionMutator<Throwable>
-
hasReply
boolean hasReply()
Returns true if this reply is not empty and waiting to be feeded with a reply. Important for an object waiting for a reply - when method setMethodReply() has been called, then thi method returns true, or if an instance has been created already containing a repy (not being empty).- Returns:
- True if an instance of this interface (which did not contain a valid reply) has been feeded with a reply.
-
-