public abstract class AbstractContext extends Object implements Context
Context implementations.| Constructor and Description |
|---|
AbstractContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addContextListener(Class<?> type,
ContextListener listener)
Registers a
ContextListener for a specified type. |
protected void |
fireContextEvent(Class<?> type)
|
protected Map<Class<?>,List<ContextListener>> |
getListeners()
Gets all registered
ContextListener. |
void |
removeContextListener(Class<?> type,
ContextListener listener)
Unegisters a
ContextListener for a specified type. |
public void addContextListener(Class<?> type, ContextListener listener)
ContextListener for a specified type.
The listener will be notified when instances of the specified type get added or removed.addContextListener in interface Contexttype - the type to listen forlistener - the ContextListenerpublic void removeContextListener(Class<?> type, ContextListener listener)
ContextListener for a specified type.removeContextListener in interface Contexttype - the type to listen forlistener - the ContextListenerprotected void fireContextEvent(Class<?> type)
type - protected final Map<Class<?>,List<ContextListener>> getListeners()
ContextListener.Map grouping all registered ContextListener by the type of instances they are listening
for.Copyright © 2012–2015 Drombler. All rights reserved.