org.ow2.jonas.camel.service.impl
Class CamelContextServiceFactory

java.lang.Object
  extended by org.ow2.jonas.camel.service.impl.CamelContextServiceFactory
All Implemented Interfaces:
org.osgi.framework.ServiceFactory

public class CamelContextServiceFactory
extends java.lang.Object
implements org.osgi.framework.ServiceFactory

CamelContext service factory.

Author:
Guillaume Porcher

Constructor Summary
CamelContextServiceFactory()
           
 
Method Summary
 java.lang.Object getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration)
          Get a CamelContext.
 void setCamelService(ICamelService camelService)
           
 void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration, java.lang.Object camelContext)
          Stop the camel context for the bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelContextServiceFactory

public CamelContextServiceFactory()
Method Detail

getService

public java.lang.Object getService(org.osgi.framework.Bundle bundle,
                                   org.osgi.framework.ServiceRegistration registration)
Get a CamelContext. A new camel context is created for each requiring bundle.

Specified by:
getService in interface org.osgi.framework.ServiceFactory
Parameters:
bundle - The bundle using the service.
registration - The ServiceRegistration object for the service.
Returns:
the camel context created for the bundle
See Also:
ServiceFactory.getService(org.osgi.framework.Bundle, org.osgi.framework.ServiceRegistration)

ungetService

public void ungetService(org.osgi.framework.Bundle bundle,
                         org.osgi.framework.ServiceRegistration registration,
                         java.lang.Object camelContext)
Stop the camel context for the bundle.

Specified by:
ungetService in interface org.osgi.framework.ServiceFactory
Parameters:
bundle - The bundle releasing the service.
registration - The ServiceRegistration object for the service.
camelContext - The CamelContext returned by a previous call to getService(Bundle, ServiceRegistration) .
See Also:
ServiceFactory.ungetService(org.osgi.framework.Bundle, org.osgi.framework.ServiceRegistration, java.lang.Object)

setCamelService

public void setCamelService(ICamelService camelService)
Parameters:
camelService - the camelService to set


Copyright © 2010 OW2 Consortium. All Rights Reserved.