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 java.lang.Object implements ActionRuleApplicable, ResponseRuleApplicable, Replicable<ResponseRule>
The Class ResponseRule.Created: 2008. 03. 22 PM 5:48:09
-
-
Constructor Summary
Constructors Constructor Description ResponseRule(boolean explicit)
Instantiates a new ResponseRule.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyActionRule(Executable action)
Adds an executable action instance.Executable
applyActionRule(AnnotatedActionRule annotatedActionRule)
Adds the annotated method action rule.Executable
applyActionRule(ChooseRule chooseRule)
Adds a list of action instances that can be executed.Executable
applyActionRule(EchoActionRule echoActionRule)
Adds the echo action rule.Executable
applyActionRule(HeaderActionRule headerActionRule)
Adds the header action rule.Executable
applyActionRule(IncludeActionRule includeActionRule)
Adds the include action rule.Executable
applyActionRule(InvokeActionRule invokeActionRule)
Adds the invoke action rule.Response
applyResponseRule(DispatchRule dispatchRule)
Apply the dispatch rule to the response rule.Response
applyResponseRule(ForwardRule forwardRule)
Apply the forward rule to the response rule.Response
applyResponseRule(RedirectRule redirectRule)
Apply the redirect rule to the response rule.Response
applyResponseRule(TransformRule transformRule)
Apply the transform rule to the response rule.ActionList
getActionList()
java.lang.String
getEncoding()
Gets the response encoding.java.lang.String
getName()
Response
getResponse()
ResponseType
getResponseType()
boolean
isExplicit()
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(java.lang.String name, java.lang.String encoding)
ResponseRule
replicate()
Creates and returns a new instance after replicating a rule or Object.static ResponseRule
replicate(ResponseRule responseRule)
void
setActionList(ActionList actionList)
void
setEncoding(java.lang.String encoding)
Sets the response encoding.void
setName(java.lang.String name)
void
setResponse(Response response)
java.lang.String
toString()
-
-
-
Method Detail
-
isExplicit
public boolean isExplicit()
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String name)
-
getEncoding
public java.lang.String getEncoding()
Gets the response encoding.- Returns:
- the response encoding
-
setEncoding
public void setEncoding(java.lang.String encoding)
Sets the response encoding.- Parameters:
encoding
- the new response encoding
-
getActionList
public ActionList getActionList()
-
setActionList
public void setActionList(ActionList actionList)
-
applyActionRule
public Executable applyActionRule(HeaderActionRule headerActionRule)
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
public Executable applyActionRule(EchoActionRule echoActionRule)
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
public Executable applyActionRule(InvokeActionRule invokeActionRule)
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
public Executable applyActionRule(AnnotatedActionRule annotatedActionRule)
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
public Executable applyActionRule(IncludeActionRule includeActionRule)
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
public Executable applyActionRule(ChooseRule chooseRule)
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
public void applyActionRule(Executable action)
Description copied from interface:ActionRuleApplicable
Adds an executable action instance.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
action
- an executable action instance
-
getResponse
public Response getResponse()
-
setResponse
public void setResponse(Response response)
-
getResponseType
public ResponseType getResponseType()
-
applyResponseRule
public Response applyResponseRule(TransformRule transformRule)
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
public Response applyResponseRule(DispatchRule dispatchRule)
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
public Response applyResponseRule(ForwardRule forwardRule)
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
public Response applyResponseRule(RedirectRule redirectRule)
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
public ResponseRule 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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
newInstance
public static ResponseRule newInstance(java.lang.String name, java.lang.String encoding) throws IllegalRuleException
- Throws:
IllegalRuleException
-
newInstance
public static ResponseRule newInstance(TransformRule transformRule)
-
newInstance
public static ResponseRule newInstance(DispatchRule dispatchRule)
-
newInstance
public static ResponseRule newInstance(ForwardRule forwardRule)
-
newInstance
public static ResponseRule newInstance(RedirectRule redirectRule)
-
newInstance
public static ResponseRule newInstance(CustomTransformResponse response)
-
replicate
public static ResponseRule replicate(ResponseRule responseRule)
-
-