Class InterceptorResponse
java.lang.Object
org.distributeme.core.interceptor.InterceptorResponse
Returned by the interceptor as a result of call interception.
- Version:
- $Id: $Id
- Author:
- lrosenberg
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InterceptorResponseDefault reply variable.static final InterceptorResponseDefault reply variable.static final InterceptorResponseDefault reply variable. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for InterceptorResponse. -
Method Summary
Modifier and TypeMethodDescriptionstatic final InterceptorResponseFactory method to create a ready to use response.Getter for the fieldcommand.Getter for the fieldexception.Getter for the fieldreturnValue.static final InterceptorResponsereturnLater(Object returnValue) Factory method to create a ready to use response.static final InterceptorResponseFactory method to create a ready to use response.toString()toString.
-
Field Details
-
CONTINUE
Default reply variable. Helps save heap space ;-). -
RETURN_AND_FAIL
Default reply variable. Helps save heap space ;-). -
ABORT_AND_FAIL
Default reply variable. Helps save heap space ;-).
-
-
Constructor Details
-
InterceptorResponse
Constructor for InterceptorResponse.
- Parameters:
aCommand- aInterceptorResponse.InterceptorCommandobject.
-
-
Method Details
-
getCommand
Getter for the field
command.- Returns:
- a
InterceptorResponse.InterceptorCommandobject.
-
toString
toString.
-
getException
Getter for the field
exception.- Returns:
- a
Exceptionobject.
-
getReturnValue
Getter for the field
returnValue.- Returns:
- a
Objectobject.
-
returnNow
Factory method to create a ready to use response. This response signalizes that the execution should be immediately stopped and a return value returned to the caller.- Parameters:
returnValue- return value which should be returned to the caller.- Returns:
- the ready-to-use InterceptorResponse object.
-
returnLater
Factory method to create a ready to use response. This response signalizes that the execution should be continued and a return value returned to the caller later. This is useful if you want to give other interceptors a chance to interact with the new return value (logging, debug etc).- Parameters:
returnValue- return value which should be returned to the caller.- Returns:
- the ready-to-use InterceptorResponse object.
-
abortNow
Factory method to create a ready to use response. Aborts immediately and throws the exception.- Parameters:
anException- exception to be thrown on the client side.- Returns:
- the ready-to-use InterceptorResponse object.
-