Package com.aspectran.core.context.rule
Class ExceptionThrownRule
- java.lang.Object
-
- com.aspectran.core.context.rule.ExceptionThrownRule
-
- All Implemented Interfaces:
ActionRuleApplicable,ResponseRuleApplicable
public class ExceptionThrownRule extends java.lang.Object implements ActionRuleApplicable, ResponseRuleApplicable
The Class ExceptionThrownRule.Created: 2008. 04. 01 PM 11:19:28
-
-
Constructor Summary
Constructors Constructor Description ExceptionThrownRule()ExceptionThrownRule(AspectAdviceRule aspectAdviceRule)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyActionRule(Executable action)Adds an executable action instance.ExecutableapplyActionRule(AnnotatedActionRule annotatedActionRule)Adds the annotated method action rule.ExecutableapplyActionRule(ChooseRule chooseRule)Adds a list of action instances that can be executed.ExecutableapplyActionRule(EchoActionRule echoActionRule)Adds the echo action rule.ExecutableapplyActionRule(HeaderActionRule headerActionRule)Adds the header action rule.ExecutableapplyActionRule(IncludeActionRule includeActionRule)Adds the include action rule.ExecutableapplyActionRule(InvokeActionRule invokeActionRule)Adds the invoke action rule.ResponseapplyResponseRule(DispatchRule dispatchRule)Apply the dispatch rule to the response rule.ResponseapplyResponseRule(ForwardRule forwardRule)Apply the forward rule to the response rule.ResponseapplyResponseRule(RedirectRule redirectRule)Apply the redirect rule to the response rule.ResponseapplyResponseRule(TransformRule transformRule)Apply the transform rule to the response rule.ExecutablegetAction()Returns the advice action.ActionTypegetActionType()Returns the action type of the executable action.AspectAdviceRulegetAspectAdviceRule()java.lang.String[]getExceptionTypes()ResponsegetResponse(java.lang.String contentType)ResponseMapgetResponseMap()Gets the response map.static ExceptionThrownRulenewInstance(java.lang.Class<? extends java.lang.Throwable>[] types, AnnotatedAction action)voidsetAction(AnnotatedAction action)voidsetExceptionTypes(java.lang.String... exceptionTypes)
-
-
-
Constructor Detail
-
ExceptionThrownRule
public ExceptionThrownRule()
-
ExceptionThrownRule
public ExceptionThrownRule(AspectAdviceRule aspectAdviceRule)
-
-
Method Detail
-
getAspectAdviceRule
public AspectAdviceRule getAspectAdviceRule()
-
getExceptionTypes
public java.lang.String[] getExceptionTypes()
-
setExceptionTypes
public void setExceptionTypes(java.lang.String... exceptionTypes)
-
getAction
public Executable getAction()
Returns the advice action.- Returns:
- the advice action
-
setAction
public void setAction(AnnotatedAction action)
-
getActionType
public ActionType getActionType()
Returns the action type of the executable action.- Returns:
- the action type
-
getResponse
public Response getResponse(java.lang.String contentType)
-
getResponseMap
public ResponseMap getResponseMap()
Gets the response map.- Returns:
- the response map
-
applyActionRule
public Executable applyActionRule(HeaderActionRule headerActionRule)
Description copied from interface:ActionRuleApplicableAdds the header action rule.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
headerActionRule- the header action rule- Returns:
- an instance of the executable action
-
applyActionRule
public Executable applyActionRule(EchoActionRule echoActionRule)
Description copied from interface:ActionRuleApplicableAdds the echo action rule.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
echoActionRule- the echo action rule- Returns:
- an instance of the executable action
-
applyActionRule
public Executable applyActionRule(InvokeActionRule invokeActionRule)
Description copied from interface:ActionRuleApplicableAdds the invoke action rule.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
invokeActionRule- the invoke action rule- Returns:
- an instance of the executable action
-
applyActionRule
public Executable applyActionRule(AnnotatedActionRule annotatedActionRule)
Description copied from interface:ActionRuleApplicableAdds the annotated method action rule.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
annotatedActionRule- the annotated method action rule- Returns:
- an instance of the executable action
-
applyActionRule
public Executable applyActionRule(IncludeActionRule includeActionRule)
Description copied from interface:ActionRuleApplicableAdds the include action rule.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
includeActionRule- the include action rule- Returns:
- an instance of the executable action
-
applyActionRule
public Executable applyActionRule(ChooseRule chooseRule)
Description copied from interface:ActionRuleApplicableAdds a list of action instances that can be executed.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
chooseRule- the choose rule- Returns:
- an instance of the executable action
-
applyActionRule
public void applyActionRule(Executable action)
Description copied from interface:ActionRuleApplicableAdds an executable action instance.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
action- an executable action instance
-
applyResponseRule
public Response applyResponseRule(TransformRule transformRule)
Description copied from interface:ResponseRuleApplicableApply the transform rule to the response rule.- Specified by:
applyResponseRulein interfaceResponseRuleApplicable- Parameters:
transformRule- the transform rule- Returns:
- the response
-
applyResponseRule
public Response applyResponseRule(DispatchRule dispatchRule)
Description copied from interface:ResponseRuleApplicableApply the dispatch rule to the response rule.- Specified by:
applyResponseRulein interfaceResponseRuleApplicable- Parameters:
dispatchRule- the dispatch rule- Returns:
- the response
-
applyResponseRule
public Response applyResponseRule(ForwardRule forwardRule)
Description copied from interface:ResponseRuleApplicableApply the forward rule to the response rule.- Specified by:
applyResponseRulein interfaceResponseRuleApplicable- Parameters:
forwardRule- the forward rule- Returns:
- the response
-
applyResponseRule
public Response applyResponseRule(RedirectRule redirectRule)
Description copied from interface:ResponseRuleApplicableApply the redirect rule to the response rule.- Specified by:
applyResponseRulein interfaceResponseRuleApplicable- Parameters:
redirectRule- the redirect rule- Returns:
- the response
-
newInstance
public static ExceptionThrownRule newInstance(java.lang.Class<? extends java.lang.Throwable>[] types, AnnotatedAction action)
-
-