|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents a sequence of interceptors. It offers operations for runtime manipulations of particular interceptors - adding, removing, etc. These operations affect communication but they do not have any implications for persistent configuration of the interceptor chain.
Field Summary | |
static int |
INTERCEPTOR_DIRECTION_IN
Interceptor is used for incoming message. |
static int |
INTERCEPTOR_DIRECTION_INOUT
Interceptor is used both for incoming and outgoing message. |
static int |
INTERCEPTOR_DIRECTION_OUT
Interceptor is used for outgoing message. |
Method Summary | |
void |
add(java.lang.String interceptor,
int direction)
Adds an interceptor to the end of the interceptor chain. |
void |
add(java.lang.String interceptor,
int position,
int direction)
Inserts an interceptor to the specified position. |
Interceptor |
get(int position)
Returns an interceptor on specified position. |
int |
getDirection(int position)
Returns a communication direction of the interceptor residing on specified position within the chain. |
java.lang.String |
getName(int position)
Returns an interceptor name on the specified position. |
void |
load(Configurable config)
Loads the chain. |
void |
remove(int position)
Removes an interceptor residing from the specified position of the chain. |
void |
setDirection(int position,
int direction)
Sets a communication direction of the interceptor residing on specified position within the chain. |
int |
size()
Returns the size (number of interceptors) of the chain. |
Field Detail |
public static final int INTERCEPTOR_DIRECTION_IN
public static final int INTERCEPTOR_DIRECTION_OUT
public static final int INTERCEPTOR_DIRECTION_INOUT
Method Detail |
public void load(Configurable config)
config
- chain's configpublic Interceptor get(int position)
position
- interceptor's index within the chain
java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic java.lang.String getName(int position)
position
- interceptor's index within the chain
java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic void add(java.lang.String interceptor, int position, int direction)
interceptor
- interceptor to be insertedposition
- interceptor's index within the chaindirection
- interceptor's direction
java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic void add(java.lang.String interceptor, int direction)
interceptor
- interceptor to be addeddirection
- interceptor's directionpublic void remove(int position)
position
- interceptor's index within the chain
java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic int getDirection(int position)
INTERCEPTOR_DIRECTION_IN
and
INTERCEPTOR_DIRECTION_OUT
.
position
- specifies the interceptor's position within the
chain
java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic void setDirection(int position, int direction)
INTERCEPTOR_DIRECTION_IN
and
INTERCEPTOR_DIRECTION_OUT
.
position
- specifies the interceptor's position within the
chaindirection
- the interceptor's direction
java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |