public abstract class AbstractListenerImpl extends Object
CacheManagerNotifierImpl
and
CacheNotifierImpl
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractListenerImpl.ListenerInvocation
Class that encapsulates a valid invocation for a given registered listener - containing a reference to the method
to be invoked as well as the target object.
|
Modifier and Type | Field and Description |
---|---|
protected ExecutorService |
asyncProcessor |
protected Map<Class<? extends Annotation>,List<AbstractListenerImpl.ListenerInvocation>> |
listenersMap |
protected ExecutorService |
syncProcessor |
Constructor and Description |
---|
AbstractListenerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Object listener) |
protected abstract Map<Class<? extends Annotation>,Class<?>> |
getAllowedMethodAnnotations() |
protected List<AbstractListenerImpl.ListenerInvocation> |
getListenerCollectionForAnnotation(Class<? extends Annotation> annotation) |
Set<Object> |
getListeners() |
protected abstract Log |
getLog() |
void |
removeListener(Object listener) |
void |
start() |
protected static boolean |
testListenerClassValidity(Class<?> listenerClass)
Tests if a class is properly annotated as a CacheListener and returns whether callbacks on this class should be
invoked synchronously or asynchronously.
|
protected static void |
testListenerMethodValidity(Method m,
Class<?> allowedParameter,
String annotationName) |
protected final Map<Class<? extends Annotation>,List<AbstractListenerImpl.ListenerInvocation>> listenersMap
protected ExecutorService syncProcessor
protected ExecutorService asyncProcessor
public void start()
protected abstract Log getLog()
protected abstract Map<Class<? extends Annotation>,Class<?>> getAllowedMethodAnnotations()
protected List<AbstractListenerImpl.ListenerInvocation> getListenerCollectionForAnnotation(Class<? extends Annotation> annotation)
public void removeListener(Object listener)
public void addListener(Object listener)
protected static boolean testListenerClassValidity(Class<?> listenerClass)
listenerClass
- class to inspectCopyright © 2012 JBoss by Red Hat. All Rights Reserved.