Class InterceptorRegistry
-
- All Implemented Interfaces:
public class InterceptorRegistryRegistry to store and access a set of interceptor objects.
-
-
Method Summary
Modifier and Type Method Description voidaddInterceptor(Interceptor interceptor)Takes an object and seeks interceptor methods. List<InterceptorInfo>getDefaultInterceptors()Gets all default interceptors. List<InterceptorInfo>getDefaultInterceptors(Direction direction)Gets default interceptors of a specific direction. List<InterceptorInfo>getInterceptors(Direction direction, String action)Gets default interceptor of a specific direction and action. List<InterceptorInfo>getInterceptors(String action)Gets interceptors of a specific action. -
-
Method Detail
-
addInterceptor
void addInterceptor(Interceptor interceptor)
Takes an object and seeks interceptor methods.
Interceptor methods are stored in a registry for fast access. They are retrievable by using
- Parameters:
interceptor- the object where to search for interceptor methods.
-
getDefaultInterceptors
List<InterceptorInfo> getDefaultInterceptors()
Gets all default interceptors.
- Returns:
all interceptors of any direction and action.
-
getDefaultInterceptors
List<InterceptorInfo> getDefaultInterceptors(Direction direction)
Gets default interceptors of a specific direction.
- Parameters:
direction- the direction to filter for.- Returns:
all interceptors with given direction.
-
getInterceptors
List<InterceptorInfo> getInterceptors(Direction direction, String action)
Gets default interceptor of a specific direction and action.
- Parameters:
direction- the direction to filter for.action- the action to filter for.- Returns:
all interceptors with given direction and action.
-
getInterceptors
List<InterceptorInfo> getInterceptors(String action)
Gets interceptors of a specific action.
- Parameters:
action- the action to filter for.- Returns:
all interceptors of any direction with given action.
-
-
-
-