public static final class ApplicationListenerRuleProps.Builder
extends java.lang.Object
ApplicationListenerRuleProps
Constructor and Description |
---|
Builder() |
public ApplicationListenerRuleProps.Builder listener(IApplicationListener listener)
ApplicationListenerRuleProps.getListener()
listener
- The listener to attach the rule to. This parameter is required.this
public ApplicationListenerRuleProps.Builder priority(java.lang.Number priority)
BaseApplicationListenerRuleProps.getPriority()
priority
- Priority of the rule. This parameter is required.
The rule with the lowest priority will be used for every request.
Priorities must be unique.
this
public ApplicationListenerRuleProps.Builder action(ListenerAction action)
BaseApplicationListenerRuleProps.getAction()
action
- Action to perform when requests are received.
Only one of action
, fixedResponse
, redirectResponse
or targetGroups
can be specified.this
public ApplicationListenerRuleProps.Builder conditions(java.util.List<? extends ListenerCondition> conditions)
BaseApplicationListenerRuleProps.getConditions()
conditions
- Rule applies if matches the conditions.this
@Deprecated public ApplicationListenerRuleProps.Builder fixedResponse(FixedResponse fixedResponse)
BaseApplicationListenerRuleProps.getFixedResponse()
fixedResponse
- Fixed response to return.
Only one of action
, fixedResponse
, redirectResponse
or targetGroups
can be specified.this
@Deprecated public ApplicationListenerRuleProps.Builder hostHeader(java.lang.String hostHeader)
BaseApplicationListenerRuleProps.getHostHeader()
hostHeader
- Rule applies if the requested host matches the indicated host.
May contain up to three '*' wildcards.this
@Deprecated public ApplicationListenerRuleProps.Builder pathPattern(java.lang.String pathPattern)
BaseApplicationListenerRuleProps.getPathPattern()
pathPattern
- Rule applies if the requested path matches the given path pattern.this
@Deprecated public ApplicationListenerRuleProps.Builder pathPatterns(java.util.List<java.lang.String> pathPatterns)
BaseApplicationListenerRuleProps.getPathPatterns()
pathPatterns
- Rule applies if the requested path matches any of the given patterns.
Paths may contain up to three '*' wildcards.this
@Deprecated public ApplicationListenerRuleProps.Builder redirectResponse(RedirectResponse redirectResponse)
BaseApplicationListenerRuleProps.getRedirectResponse()
redirectResponse
- Redirect response to return.
Only one of action
, fixedResponse
, redirectResponse
or targetGroups
can be specified.this
public ApplicationListenerRuleProps.Builder targetGroups(java.util.List<? extends IApplicationTargetGroup> targetGroups)
BaseApplicationListenerRuleProps.getTargetGroups()
targetGroups
- Target groups to forward requests to.
Only one of action
, fixedResponse
, redirectResponse
or targetGroups
can be specified.
Implies a forward
action.
this
public ApplicationListenerRuleProps build()
ApplicationListenerRuleProps
java.lang.NullPointerException
- if any required attribute was not provided