org.apache.camel.core.osgi
Class OsgiEventAdminNotifier

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.support.EventNotifierSupport
          extended by org.apache.camel.core.osgi.OsgiEventAdminNotifier
All Implemented Interfaces:
org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.EventNotifier, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class OsgiEventAdminNotifier
extends org.apache.camel.support.EventNotifierSupport

This EventNotifier is in charge of propagating events to OSGi EventAdmin if present.


Field Summary
static String BUNDLE
           
static String BUNDLE_ID
           
static String BUNDLE_SYMBOLICNAME
           
static String BUNDLE_VERSION
           
static String CAUSE
           
static String EVENT
           
static String TIMESTAMP
           
static String TOPIC_CAMEL_CONTEXT_EVENTS
           
static String TOPIC_CAMEL_EVENTS
           
static String TOPIC_CAMEL_EXCHANGE_EVENTS
           
static String TOPIC_CAMEL_ROUTE_EVENTS
           
static String TOPIC_CAMEL_SERVICE_EVENTS
           
static String TYPE
           
 
Fields inherited from class org.apache.camel.support.EventNotifierSupport
log
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
OsgiEventAdminNotifier(org.osgi.framework.BundleContext bundleContext)
           
 
Method Summary
protected  void doStart()
           
protected  void doStop()
           
static org.osgi.framework.Version getBundleVersion(org.osgi.framework.Bundle bundle)
           
static String getTopic(EventObject event)
           
static String getType(EventObject event)
           
 boolean isEnabled(EventObject event)
           
 void notify(EventObject event)
           
static String toUpper(String text)
           
 
Methods inherited from class org.apache.camel.support.EventNotifierSupport
isIgnoreCamelContextEvents, isIgnoreExchangeCompletedEvent, isIgnoreExchangeCreatedEvent, isIgnoreExchangeEvents, isIgnoreExchangeFailedEvents, isIgnoreExchangeRedeliveryEvents, isIgnoreExchangeSendingEvents, isIgnoreExchangeSentEvents, isIgnoreRouteEvents, isIgnoreServiceEvents, setIgnoreCamelContextEvents, setIgnoreExchangeCompletedEvent, setIgnoreExchangeCreatedEvent, setIgnoreExchangeEvents, setIgnoreExchangeFailedEvents, setIgnoreExchangeRedeliveryEvents, setIgnoreExchangeSendingEvents, setIgnoreExchangeSentEvents, setIgnoreRouteEvents, setIgnoreServiceEvents
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
See Also:
Constant Field Values

EVENT

public static final String EVENT
See Also:
Constant Field Values

TIMESTAMP

public static final String TIMESTAMP
See Also:
Constant Field Values

BUNDLE

public static final String BUNDLE
See Also:
Constant Field Values

BUNDLE_ID

public static final String BUNDLE_ID
See Also:
Constant Field Values

BUNDLE_SYMBOLICNAME

public static final String BUNDLE_SYMBOLICNAME
See Also:
Constant Field Values

BUNDLE_VERSION

public static final String BUNDLE_VERSION
See Also:
Constant Field Values

CAUSE

public static final String CAUSE
See Also:
Constant Field Values

TOPIC_CAMEL_EVENTS

public static final String TOPIC_CAMEL_EVENTS
See Also:
Constant Field Values

TOPIC_CAMEL_CONTEXT_EVENTS

public static final String TOPIC_CAMEL_CONTEXT_EVENTS
See Also:
Constant Field Values

TOPIC_CAMEL_EXCHANGE_EVENTS

public static final String TOPIC_CAMEL_EXCHANGE_EVENTS
See Also:
Constant Field Values

TOPIC_CAMEL_SERVICE_EVENTS

public static final String TOPIC_CAMEL_SERVICE_EVENTS
See Also:
Constant Field Values

TOPIC_CAMEL_ROUTE_EVENTS

public static final String TOPIC_CAMEL_ROUTE_EVENTS
See Also:
Constant Field Values
Constructor Detail

OsgiEventAdminNotifier

public OsgiEventAdminNotifier(org.osgi.framework.BundleContext bundleContext)
Method Detail

notify

public void notify(EventObject event)
            throws Exception
Throws:
Exception

isEnabled

public boolean isEnabled(EventObject event)

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class org.apache.camel.support.EventNotifierSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class org.apache.camel.support.EventNotifierSupport
Throws:
Exception

toUpper

public static String toUpper(String text)

getType

public static String getType(EventObject event)

getTopic

public static String getTopic(EventObject event)

getBundleVersion

public static org.osgi.framework.Version getBundleVersion(org.osgi.framework.Bundle bundle)


Apache Camel