- 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<E extends Throwable,B extends org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<E,B>>, org.refcodes.exception.ExceptionAccessor.ExceptionMutator<E extends Object>, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<E 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.InstanceIdPropertyNested classes/interfaces inherited from interface org.refcodes.remoting.SessionIdAccessor
SessionIdAccessor.SessionIdBuilder<B extends SessionIdAccessor.SessionIdBuilder<B>>, SessionIdAccessor.SessionIdMutator, SessionIdAccessor.SessionIdProperty -
Method Summary
Modifier and Type Method Description ObjectgetReturnValue()Returns the return value of a method call.booleanhasReply()Returns true if this reply is not empty and waiting to be feeded with a reply.booleanisException()Returns true if the reply carries an exception which occurred when executing the method call.booleanisReturnValue()Returns true if the reply carries a valid return value.voidsetException(Throwable aException)voidsetReply(Reply methodReply)Sets a reply.voidsetReturnValue(Object returnValue)Sets the return value.Methods inherited from interface org.refcodes.exception.ExceptionAccessor
getExceptionMethods inherited from interface org.refcodes.exception.ExceptionAccessor.ExceptionProperty
letExceptionMethods inherited from interface org.refcodes.mixin.InstanceIdAccessor
getInstanceIdMethods inherited from interface org.refcodes.remoting.SessionIdAccessor
getSessionId
-
Method Details
-
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
Sets the return value.- Parameters:
returnValue- Description is currently not available!
-
setReply
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
- Specified by:
setExceptionin 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.
-