Package org.cyclos.impl.system
Interface ServiceInterceptorContext
-
- All Known Implementing Classes:
ServiceInterceptorContextImpl
public interface ServiceInterceptorContextA shared context between service interceptors
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetAttribute(String name)Returns a contextual attribute by nameMap<String,Object>getAttributes()Returns the contextual attributesThrowablegetError()Returns the error for the service invocationObject[]getParameters()Returns the invocation parametersObjectgetResult()Returns service invocation resultbooleanisSkipInvocation()Returns whether the original service invocation should be skippedbooleanisSuccess()Returns whether no error is present in the current invocationvoidsetAttribute(String name, Object value)Sets a contextual attribute by namevoidsetError(Throwable error)Sets the error for the service invocationvoidsetParameter(int index, Object value)Replaces an specific invocation parameter.voidsetParameters(Object[] newParams)Replaces all invocation parameters.voidsetResult(Object result)Sets the service invocation resultvoidsetSkipInvocation(boolean skipInvocation)Sets whether the original service invocation should be skippedvoidskipInvocation()Marks to skip the actual service invocation.voidskipInvocation(Object result)Equivallent toskipInvocation()and thensetResult(Object)
-
-
-
Method Detail
-
getError
Throwable getError()
Returns the error for the service invocation
-
getParameters
Object[] getParameters()
Returns the invocation parameters
-
getResult
Object getResult()
Returns service invocation result
-
isSkipInvocation
boolean isSkipInvocation()
Returns whether the original service invocation should be skipped
-
isSuccess
boolean isSuccess()
Returns whether no error is present in the current invocation
-
setError
void setError(Throwable error)
Sets the error for the service invocation
-
setParameter
void setParameter(int index, Object value)Replaces an specific invocation parameter. The new parameter must match the corresponding service operation parameter type.
-
setParameters
void setParameters(Object[] newParams)
Replaces all invocation parameters. The new parameters size must be the same as the service operation parameters, and each parameter must match the type.
-
setResult
void setResult(Object result)
Sets the service invocation result
-
setSkipInvocation
void setSkipInvocation(boolean skipInvocation)
Sets whether the original service invocation should be skipped
-
skipInvocation
void skipInvocation()
Marks to skip the actual service invocation. UsesetResult(Object)to set what will be returned by the method
-
skipInvocation
void skipInvocation(Object result)
Equivallent toskipInvocation()and thensetResult(Object)
-
-