Class InterceptorList
java.lang.Object
com.sun.corba.ee.impl.interceptors.InterceptorList
Provides a repository of registered Portable Interceptors, organized
by type. This list is designed to be accessed as efficiently as
possible during runtime, with the expense of added complexity during
initialization and interceptor registration. The class is designed
to easily allow for the addition of new interceptor types.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Class[]
(package private) static final int
(package private) static final int
(package private) static final int
private Interceptor[][]
private boolean
(package private) static final int
private static final InterceptorsSystemException
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
Destroys all interceptors in this list by invoking their destroy() method.(package private) Interceptor[]
getInterceptors
(int type) Retrieves an array of interceptors of the given type.private void
growInterceptorArray
(int type) Grows the given interceptor array by one:(package private) boolean
hasInterceptorsOfType
(int type) Returns true if there is at least one interceptor of the given type, or false if not.private void
Initializes all interceptors arrays to zero-length arrays of the correct type, based on the classTypes list.(package private) void
lock()
Locks this interceptor list so that no more interceptors may be registered.(package private) void
register_interceptor
(Interceptor interceptor, int type) Registers an interceptor of the given type into the interceptor list.(package private) void
Sort interceptors.
-
Field Details
-
wrapper
-
INTERCEPTOR_TYPE_CLIENT
static final int INTERCEPTOR_TYPE_CLIENT- See Also:
-
INTERCEPTOR_TYPE_SERVER
static final int INTERCEPTOR_TYPE_SERVER- See Also:
-
INTERCEPTOR_TYPE_IOR
static final int INTERCEPTOR_TYPE_IOR- See Also:
-
NUM_INTERCEPTOR_TYPES
static final int NUM_INTERCEPTOR_TYPES- See Also:
-
classTypes
-
locked
private boolean locked -
interceptors
-
-
Constructor Details
-
InterceptorList
InterceptorList()Creates a new Interceptor List. Constructor is package scope so only the ORB can create it.
-
-
Method Details
-
register_interceptor
Registers an interceptor of the given type into the interceptor list. The type is one of:- INTERCEPTOR_TYPE_CLIENT - ClientRequestInterceptor
- INTERCEPTOR_TYPE_SERVER - ServerRequestInterceptor
- INTERCEPTOR_TYPE_IOR - IORInterceptor
- Throws:
DuplicateName
- Thrown if an interceptor of the given name already exists for the given type.
-
lock
void lock()Locks this interceptor list so that no more interceptors may be registered. This method is called after all interceptors are registered for security reasons. -
getInterceptors
Retrieves an array of interceptors of the given type. For efficiency, the type parameter is assumed to be valid. -
hasInterceptorsOfType
boolean hasInterceptorsOfType(int type) Returns true if there is at least one interceptor of the given type, or false if not. -
initInterceptorArrays
private void initInterceptorArrays()Initializes all interceptors arrays to zero-length arrays of the correct type, based on the classTypes list. -
growInterceptorArray
private void growInterceptorArray(int type) Grows the given interceptor array by one: -
destroyAll
void destroyAll()Destroys all interceptors in this list by invoking their destroy() method. -
sortInterceptors
void sortInterceptors()Sort interceptors.
-