org.eclipse.gemini.blueprint.extender.internal.activator.listeners
Class BaseListener

java.lang.Object
  extended by org.eclipse.gemini.blueprint.extender.internal.activator.listeners.BaseListener
All Implemented Interfaces:
EventListener, org.osgi.framework.BundleListener, org.osgi.framework.SynchronousBundleListener
Direct Known Subclasses:
NamespaceBundleLister

public abstract class BaseListener
extends Object
implements org.osgi.framework.SynchronousBundleListener

Common base class for ContextLoaderListener listeners.

Author:
Costin Leau

Field Summary
static int LAZY_ACTIVATION_EVENT_TYPE
           
protected  Map<org.osgi.framework.Bundle,Object> lazyBundleCache
          common cache used for tracking down bundles started lazily so they don't get processed twice (once when started lazy, once when started fully)
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
BaseListener()
           
 
Method Summary
 void bundleChanged(org.osgi.framework.BundleEvent event)
          A bundle has been started, stopped, resolved, or unresolved.
 void close()
           
protected abstract  void handleEvent(org.osgi.framework.BundleEvent event)
           
protected  boolean pop(org.osgi.framework.Bundle bundle)
           
protected  void push(org.osgi.framework.Bundle bundle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAZY_ACTIVATION_EVENT_TYPE

public static final int LAZY_ACTIVATION_EVENT_TYPE
See Also:
Constant Field Values

log

protected final org.apache.commons.logging.Log log

lazyBundleCache

protected final Map<org.osgi.framework.Bundle,Object> lazyBundleCache
common cache used for tracking down bundles started lazily so they don't get processed twice (once when started lazy, once when started fully)

Constructor Detail

BaseListener

public BaseListener()
Method Detail

push

protected void push(org.osgi.framework.Bundle bundle)

pop

protected boolean pop(org.osgi.framework.Bundle bundle)

bundleChanged

public void bundleChanged(org.osgi.framework.BundleEvent event)
A bundle has been started, stopped, resolved, or unresolved. This method is a synchronous callback, do not do any long-running work in this thread.

Specified by:
bundleChanged in interface org.osgi.framework.BundleListener
See Also:
BundleListener.bundleChanged(org.osgi.framework.BundleEvent)

handleEvent

protected abstract void handleEvent(org.osgi.framework.BundleEvent event)

close

public void close()


Copyright © 2006-2013. All Rights Reserved.