Package com.aspectran.core.context.rule
Class ResponseRule
java.lang.Object
com.aspectran.core.context.rule.ResponseRule
- All Implemented Interfaces:
ActionRuleApplicable
,Replicable<ResponseRule>
,ResponseRuleApplicable
public class ResponseRule
extends Object
implements ActionRuleApplicable, ResponseRuleApplicable, Replicable<ResponseRule>
The Class ResponseRule.
Created: 2008. 03. 22 PM 5:48:09
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyActionRule
(Executable action) Adds an executable action instance.applyActionRule
(AnnotatedActionRule annotatedActionRule) Adds the annotated method action rule.applyActionRule
(ChooseRule chooseRule) Adds a list of action instances that can be executed.applyActionRule
(EchoActionRule echoActionRule) Adds the echo action rule.applyActionRule
(HeaderActionRule headerActionRule) Adds the header action rule.applyActionRule
(IncludeActionRule includeActionRule) Adds the include action rule.applyActionRule
(InvokeActionRule invokeActionRule) Adds the invoke action rule.applyResponseRule
(DispatchRule dispatchRule) Apply the dispatch rule to the response rule.applyResponseRule
(ForwardRule forwardRule) Apply the forward rule to the response rule.applyResponseRule
(RedirectRule redirectRule) Apply the redirect rule to the response rule.applyResponseRule
(TransformRule transformRule) Apply the transform rule to the response rule.Gets the response encoding.getName()
boolean
static ResponseRule
newInstance
(CustomTransformResponse response) static ResponseRule
newInstance
(DispatchRule dispatchRule) static ResponseRule
newInstance
(ForwardRule forwardRule) static ResponseRule
newInstance
(RedirectRule redirectRule) static ResponseRule
newInstance
(TransformRule transformRule) static ResponseRule
newInstance
(String name, String encoding) Creates and returns a new instance after replicating a rule or Object.static ResponseRule
replicate
(ResponseRule responseRule) void
setActionList
(ActionList actionList) void
setEncoding
(String encoding) Sets the response encoding.void
void
setResponse
(Response response) toString()
-
Constructor Details
-
ResponseRule
public ResponseRule(boolean explicit) Instantiates a new ResponseRule.- Parameters:
explicit
- whether this response rule is explicit
-
-
Method Details
-
isExplicit
public boolean isExplicit() -
getName
-
setName
-
getEncoding
Gets the response encoding.- Returns:
- the response encoding
-
setEncoding
Sets the response encoding.- Parameters:
encoding
- the new response encoding
-
getActionList
-
setActionList
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the header action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
headerActionRule
- the header action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the echo action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
echoActionRule
- the echo action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the invoke action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
invokeActionRule
- the invoke action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the annotated method action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
annotatedActionRule
- the annotated method action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the include action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
includeActionRule
- the include action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds a list of action instances that can be executed.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
chooseRule
- the choose rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds an executable action instance.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
action
- an executable action instance
-
getResponse
-
setResponse
-
getResponseType
-
applyResponseRule
Description copied from interface:ResponseRuleApplicable
Apply the transform rule to the response rule.- Specified by:
applyResponseRule
in interfaceResponseRuleApplicable
- Parameters:
transformRule
- the transform rule- Returns:
- the response
-
applyResponseRule
Description copied from interface:ResponseRuleApplicable
Apply the dispatch rule to the response rule.- Specified by:
applyResponseRule
in interfaceResponseRuleApplicable
- Parameters:
dispatchRule
- the dispatch rule- Returns:
- the response
-
applyResponseRule
Description copied from interface:ResponseRuleApplicable
Apply the forward rule to the response rule.- Specified by:
applyResponseRule
in interfaceResponseRuleApplicable
- Parameters:
forwardRule
- the forward rule- Returns:
- the response
-
applyResponseRule
Description copied from interface:ResponseRuleApplicable
Apply the redirect rule to the response rule.- Specified by:
applyResponseRule
in interfaceResponseRuleApplicable
- Parameters:
redirectRule
- the redirect rule- Returns:
- the response
-
replicate
Description copied from interface:Replicable
Creates and returns a new instance after replicating a rule or Object.- Specified by:
replicate
in interfaceReplicable<ResponseRule>
- Returns:
- replicated rule or new instance of Object
-
toString
-
newInstance
@NonNull public static ResponseRule newInstance(String name, String encoding) throws IllegalRuleException - Throws:
IllegalRuleException
-
newInstance
-
newInstance
-
newInstance
-
newInstance
-
newInstance
-
replicate
-