Interface Reply
- 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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.exception.ExceptionAccessor
org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<EXC,B>, org.refcodes.exception.ExceptionAccessor.ExceptionMutator<EXC>, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<EXC> Nested classes/interfaces inherited from interface org.refcodes.mixin.InstanceIdAccessor
org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B>, org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator, org.refcodes.mixin.InstanceIdAccessor.InstanceIdPropertyNested classes/interfaces inherited from interface SessionIdAccessor
SessionIdAccessor.SessionIdBuilder<B>, SessionIdAccessor.SessionIdMutator, SessionIdAccessor.SessionIdProperty -
Method Summary
Modifier and TypeMethodDescriptionReturns the return value of a method call.booleanhasReply()Returns true if this reply is not empty and waiting to be feeded with a reply.booleanReturns true if the reply carries an exception which occurred when executing the method call.booleanReturns true if the reply carries a valid return value.voidsetException(Throwable aException) voidSets a reply.voidsetReturnValue(Object aValue) 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 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:
aValue- 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:
aReply- An object of type BlueprintMethodReply from which the replied values (throwable or return value) will be taken.
-
setException
-
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.
-