org.apache.camel.core.osgi
Class OsgiCamelContextPublisher

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.support.EventNotifierSupport
          extended by org.apache.camel.core.osgi.OsgiCamelContextPublisher
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 OsgiCamelContextPublisher
extends org.apache.camel.support.EventNotifierSupport

This EventNotifier is in charge of registering CamelContext in the OSGi registry


Field Summary
static String CONTEXT_NAME_PROPERTY
           
static String CONTEXT_SYMBOLIC_NAME_PROPERTY
           
static String CONTEXT_VERSION_PROPERTY
           
 
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
OsgiCamelContextPublisher(org.osgi.framework.BundleContext bundleContext)
           
 
Method Summary
protected  void doShutdown()
           
protected  void doStart()
           
protected  void doStop()
           
static org.osgi.framework.Version getBundleVersion(org.osgi.framework.Bundle bundle)
           
 boolean isEnabled(EventObject event)
           
 void notify(EventObject event)
           
 org.osgi.framework.ServiceRegistration registerCamelContext(org.apache.camel.CamelContext camelContext)
           
 
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, 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

CONTEXT_SYMBOLIC_NAME_PROPERTY

public static final String CONTEXT_SYMBOLIC_NAME_PROPERTY
See Also:
Constant Field Values

CONTEXT_VERSION_PROPERTY

public static final String CONTEXT_VERSION_PROPERTY
See Also:
Constant Field Values

CONTEXT_NAME_PROPERTY

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

OsgiCamelContextPublisher

public OsgiCamelContextPublisher(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

doShutdown

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

registerCamelContext

public org.osgi.framework.ServiceRegistration registerCamelContext(org.apache.camel.CamelContext camelContext)
                                                            throws org.osgi.framework.InvalidSyntaxException
Throws:
org.osgi.framework.InvalidSyntaxException

getBundleVersion

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


Apache Camel