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 ResponseRuleApplicable, ActionRuleApplicable
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(BeanActionRule beanActionRule)Adds the bean action.voidapplyActionRule(EchoActionRule echoActionRule)Adds the echo action.voidapplyActionRule(HeadingActionRule headingActionRule)Adds the heading action.voidapplyActionRule(IncludeActionRule includeActionRule)Adds the process-call action.voidapplyActionRule(MethodActionRule methodActionRule)Adds the method action.ResponseapplyResponseRule(DispatchResponseRule dispatchResponseRule)Apply the dispatch response rule to the response rule.ResponseapplyResponseRule(ForwardResponseRule forwardResponseRule)Apply the forward response rule to the response rule.ResponseapplyResponseRule(RedirectResponseRule redirectResponseRule)Apply the redirect response rule to the response rule.ResponseapplyResponseRule(TransformRule transformRule)Apply the transform response rule to the response rule.ActionTypegetActionType()Returns the action type of the executable action.AspectAdviceRulegetAspectAdviceRule()ResponsegetDefaultResponse()java.lang.String[]getExceptionTypes()ExecutablegetExecutableAction()Returns the executable action.ResponsegetResponse(java.lang.String contentType)ResponseMapgetResponseMap()Gets the response map.static ExceptionThrownRulenewInstance(java.lang.Class<? extends java.lang.Throwable>[] types, MethodAction action)voidsetDefaultResponse(Response response)voidsetExceptionTypes(java.lang.String... exceptionTypes)voidsetExecutableAction(MethodAction action)
-
-
-
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)
-
getResponse
public Response getResponse(java.lang.String contentType)
-
getResponseMap
public ResponseMap getResponseMap()
Gets the response map.- Returns:
- the response map
-
getDefaultResponse
public Response getDefaultResponse()
-
setDefaultResponse
public void setDefaultResponse(Response response)
-
applyResponseRule
public Response applyResponseRule(TransformRule transformRule)
Description copied from interface:ResponseRuleApplicableApply the transform response rule to the response rule.- Specified by:
applyResponseRulein interfaceResponseRuleApplicable- Parameters:
transformRule- the transform rule- Returns:
- the response
-
applyResponseRule
public Response applyResponseRule(DispatchResponseRule dispatchResponseRule)
Description copied from interface:ResponseRuleApplicableApply the dispatch response rule to the response rule.- Specified by:
applyResponseRulein interfaceResponseRuleApplicable- Parameters:
dispatchResponseRule- the dispatch response rule- Returns:
- the response
-
applyResponseRule
public Response applyResponseRule(RedirectResponseRule redirectResponseRule)
Description copied from interface:ResponseRuleApplicableApply the redirect response rule to the response rule.- Specified by:
applyResponseRulein interfaceResponseRuleApplicable- Parameters:
redirectResponseRule- the redirect response rule- Returns:
- the response
-
applyResponseRule
public Response applyResponseRule(ForwardResponseRule forwardResponseRule)
Description copied from interface:ResponseRuleApplicableApply the forward response rule to the response rule.- Specified by:
applyResponseRulein interfaceResponseRuleApplicable- Parameters:
forwardResponseRule- the forward response rule- Returns:
- the response
-
applyActionRule
public void applyActionRule(BeanActionRule beanActionRule)
Description copied from interface:ActionRuleApplicableAdds the bean action.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
beanActionRule- the bean action rule
-
applyActionRule
public void applyActionRule(MethodActionRule methodActionRule)
Description copied from interface:ActionRuleApplicableAdds the method action.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
methodActionRule- the bean action rule
-
applyActionRule
public void applyActionRule(IncludeActionRule includeActionRule)
Description copied from interface:ActionRuleApplicableAdds the process-call action.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
includeActionRule- the process call action rule
-
applyActionRule
public void applyActionRule(EchoActionRule echoActionRule)
Description copied from interface:ActionRuleApplicableAdds the echo action.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
echoActionRule- the echo action rule
-
applyActionRule
public void applyActionRule(HeadingActionRule headingActionRule)
Description copied from interface:ActionRuleApplicableAdds the heading action.- Specified by:
applyActionRulein interfaceActionRuleApplicable- Parameters:
headingActionRule- the heading action rule
-
getExecutableAction
public Executable getExecutableAction()
Returns the executable action.- Returns:
- the executable action
-
setExecutableAction
public void setExecutableAction(MethodAction action)
-
getActionType
public ActionType getActionType()
Returns the action type of the executable action.- Returns:
- the action type
-
newInstance
public static ExceptionThrownRule newInstance(java.lang.Class<? extends java.lang.Throwable>[] types, MethodAction action)
-
-