|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.EventDispatcher
public final class EventDispatcher
iPOJO Internal event dispatcher. This class provides an internal service event dispatcher in order to tackle the event storm that can happen when starting large-scale applications.
Extender
Method Summary | |
---|---|
void |
addListener(String itf,
ServiceListener listener)
Adds a new service listener to the m_listeners
map. |
static void |
create(BundleContext bc)
Creates the internal event dispatcher. |
static void |
dispose()
Stops and delete the internal event dispatcher. |
static EventDispatcher |
getDispatcher()
Gets the iPOJO event dispatcher. |
boolean |
removeListener(ServiceListener listener)
Removes a service listener. |
void |
serviceChanged(ServiceEvent event)
Method called when a ServiceEvent is
fired by the OSGi framework. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void create(BundleContext bc)
bc
- the iPOJO bundle context to send to the
internal event dispatcher.public static void dispose()
public static EventDispatcher getDispatcher()
null
if not created.public void serviceChanged(ServiceEvent event)
ServiceEvent
is
fired by the OSGi framework.
According to the event, this method dispatches
to interested registered listers from
the m_listeners
map.
serviceChanged
in interface ServiceListener
event
- the service eventServiceListener.serviceChanged(org.osgi.framework.ServiceEvent)
public void addListener(String itf, ServiceListener listener)
m_listeners
map. This method specifies the listen service interface
itf
- the service interfacelistener
- the service listenerpublic boolean removeListener(ServiceListener listener)
listener
- the service listener to remove
true
if the listener is
successfully removed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |