@Immutable public class CustomInterceptorConfig extends ConfigurationComponent
log
Constructor and Description |
---|
CustomInterceptorConfig(CommandInterceptor interceptor)
Constructs an interceptor config based on the supplied interceptor instance.
|
CustomInterceptorConfig(CommandInterceptor interceptor,
boolean first,
boolean last,
int index,
String afterClass,
String beforeClass)
Builds a custom interceptor.
|
Modifier and Type | Method and Description |
---|---|
CustomInterceptorConfig |
clone() |
boolean |
equals(Object o) |
String |
getAfterClass() |
String |
getBeforeClass() |
int |
getIndex() |
CommandInterceptor |
getInterceptor()
Returns a the interceptor that we want to add to the chain.
|
int |
hashCode() |
boolean |
isFirst() |
boolean |
isLast() |
void |
setAfterClass(String afterClass)
Adds the interceptor immediately after the first occurance of an interceptor having the given class.
|
void |
setBeforeClass(String beforeClass)
Adds the interceptor immediately before the first occurance of an interceptor having the given class.
|
void |
setFirst(boolean first)
Shall this interceptor be the first one in the chain?
|
void |
setIndex(int index)
Put this interceptor at the specified index, after the default chain is built.
|
void |
setLast(boolean last)
Shall this intercepto be the last one in the chain?
|
String |
toString() |
addChildConfig, addChildConfigs, passCacheToChildConfig, removeChildConfig, removeChildConfigs, replaceChildConfig, replaceChildConfigs, setCache, testImmutability
public CustomInterceptorConfig(CommandInterceptor interceptor, boolean first, boolean last, int index, String afterClass, String beforeClass)
interceptor
- interceptor instance, already initialized with all attributes specified in the configurationfirst
- true if you wan this to be the first interceptor in the chainlast
- true if you wan this to be the last interceptor in the chainindex
- an absolute position within the interceptor chainafterClass
- if you want this interceptor immediately after the specified class in the chainbeforeClass
- immediately before the specified class in the chainpublic CustomInterceptorConfig(CommandInterceptor interceptor)
interceptor
- public void setFirst(boolean first)
public void setLast(boolean last)
public void setIndex(int index)
ConfigurationException
is thrown at construction time.public void setAfterClass(String afterClass)
public void setBeforeClass(String beforeClass)
public CommandInterceptor getInterceptor()
public boolean isFirst()
setFirst(boolean)
public boolean isLast()
setLast(boolean)
public int getIndex()
getIndex()
public String getAfterClass()
getAfterClass()
public String getBeforeClass()
getBeforeClass()
public CustomInterceptorConfig clone() throws CloneNotSupportedException
clone
in interface CloneableConfigurationComponent
clone
in class ConfigurationComponent
CloneNotSupportedException
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.