Class PrePostConditionInterceptor
- java.lang.Object
- 
- jadex.bridge.service.component.interceptors.AbstractApplicableInterceptor
- 
- jadex.bridge.service.component.interceptors.ComponentThreadInterceptor
- 
- jadex.bridge.service.component.interceptors.AbstractLRUApplicableInterceptor
- 
- jadex.bridge.service.component.interceptors.PrePostConditionInterceptor
 
 
 
 
- 
- All Implemented Interfaces:
- IServiceInvocationInterceptor
 
 public class PrePostConditionInterceptor extends AbstractLRUApplicableInterceptor Interceptor that checks annotated pre- and postconditions.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classPrePostConditionInterceptor.CheckReturnValueResultListenerCheck return value, when service call is finished.static classPrePostConditionInterceptor.IntermediateResultUnavailableExceptionstatic classPrePostConditionInterceptor.PrePostConditionFetcherFetcher for pre and post condition.
 - 
Field Summary- 
Fields inherited from class jadex.bridge.service.component.interceptors.AbstractLRUApplicableInterceptorapplicables
 - 
Fields inherited from class jadex.bridge.service.component.interceptors.ComponentThreadInterceptoria
 
- 
 - 
Constructor SummaryConstructors Constructor Description PrePostConditionInterceptor(IInternalAccess ia)Create a new AbstractLRUApplicableInterceptor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ExceptioncheckPostConditions(ServiceInvocationContext context, java.lang.Object res, boolean intermediate, java.util.List<java.lang.Object> ires)Check the postconditions.protected java.lang.RuntimeExceptioncheckPreConditions(ServiceInvocationContext context)Check the precondition.booleancustomIsApplicable(ServiceInvocationContext context)Test if the interceptor is applicable.IFuture<java.lang.Void>execute(ServiceInvocationContext context)Execute the interceptor.protected intgetKeepForPostConditions(ServiceInvocationContext context)Get the number of intermediate results that should be explicitly kept by the interceptor (only necessary for subscription futures).protected booleanisPrePostCondition(java.lang.annotation.Annotation anno)Check if an annotation belongs to the supported types of pre/postconditions.- 
Methods inherited from class jadex.bridge.service.component.interceptors.AbstractLRUApplicableInterceptorisApplicable
 - 
Methods inherited from class jadex.bridge.service.component.interceptors.ComponentThreadInterceptorgetComponent
 
- 
 
- 
- 
- 
Constructor Detail- 
PrePostConditionInterceptorpublic PrePostConditionInterceptor(IInternalAccess ia) Create a new AbstractLRUApplicableInterceptor.
 
- 
 - 
Method Detail- 
customIsApplicablepublic boolean customIsApplicable(ServiceInvocationContext context) Test if the interceptor is applicable.- Specified by:
- customIsApplicablein class- AbstractLRUApplicableInterceptor
- Returns:
- True, if applicable.
 
 - 
isPrePostConditionprotected boolean isPrePostCondition(java.lang.annotation.Annotation anno) Check if an annotation belongs to the supported types of pre/postconditions.
 - 
executepublic IFuture<java.lang.Void> execute(ServiceInvocationContext context) Execute the interceptor.- Parameters:
- context- The invocation context.
 
 - 
checkPreConditionsprotected java.lang.RuntimeException checkPreConditions(ServiceInvocationContext context) Check the precondition.
 - 
checkPostConditionsprotected java.lang.Exception checkPostConditions(ServiceInvocationContext context, java.lang.Object res, boolean intermediate, java.util.List<java.lang.Object> ires) Check the postconditions.
 - 
getKeepForPostConditionsprotected int getKeepForPostConditions(ServiceInvocationContext context) Get the number of intermediate results that should be explicitly kept by the interceptor (only necessary for subscription futures).
 
- 
 
-