org.apache.servicemix.jbi.deployer.impl
Class Deployer
java.lang.Object
org.apache.servicemix.jbi.deployer.impl.Deployer
- All Implemented Interfaces:
- EventListener, LifeCycleListener, org.apache.servicemix.nmr.api.event.Listener, org.osgi.framework.BundleListener, org.osgi.framework.SynchronousBundleListener
public class Deployer
- extends Object
- implements org.osgi.framework.SynchronousBundleListener, LifeCycleListener
Deployer for JBI artifacts
|
Method Summary |
void |
bundleChanged(org.osgi.framework.BundleEvent event)
|
protected void |
checkPendingAssemblies()
|
protected void |
checkPendingInstallers()
|
ServiceUnitImpl |
createServiceUnit(ServiceUnitDesc sud,
File suRootDir,
ComponentImpl component)
|
void |
destroy()
|
org.osgi.framework.BundleContext |
getBundleContext()
|
ComponentImpl |
getComponent(String name)
|
Map<String,ComponentImpl> |
getComponents()
|
AssemblyReferencesListener |
getEndpointListener()
|
org.apache.servicemix.jbi.runtime.Environment |
getEnvironment()
|
AbstractInstaller |
getInstaller(Object o)
|
protected AbstractInstaller |
getJmxManaged()
|
Map<String,ServiceAssemblyImpl> |
getServiceAssemblies()
|
ServiceAssemblyImpl |
getServiceAssembly(String name)
|
Map<String,SharedLibraryImpl> |
getSharedLibraries()
|
SharedLibraryImpl |
getSharedLibrary(String name)
|
int |
getShutdownTimeout()
|
Storage |
getStorage(String name)
|
void |
init()
|
boolean |
isAutoStart()
|
void |
lifeCycleChanged(LifeCycleEvent event)
|
protected boolean |
match(org.osgi.framework.Bundle bundle)
|
protected void |
onBundleStarted(org.osgi.framework.Bundle bundle)
Callback called when a new bundle has been started. |
protected void |
onBundleStopping(org.osgi.framework.Bundle bundle)
|
protected void |
onBundleUninstalled(org.osgi.framework.Bundle bundle)
|
ComponentImpl |
registerComponent(org.osgi.framework.Bundle bundle,
ComponentDesc componentDesc,
javax.jbi.component.Component innerComponent,
SharedLibrary[] sharedLibraries)
|
protected void |
registerDeployedComponent(org.osgi.framework.ServiceReference reference,
javax.jbi.component.Component component)
Register an already deployed JBI component. |
void |
registerDeployedServiceAssembly(org.osgi.framework.ServiceReference reference,
org.apache.servicemix.common.osgi.DeployedAssembly assembly)
|
protected void |
registerService(org.osgi.framework.Bundle bundle,
String[] clazz,
Object service,
Dictionary props)
|
protected void |
registerService(org.osgi.framework.Bundle bundle,
String clazz,
Object service,
Dictionary props)
Register and keep track of an OSGi service |
ServiceAssemblyImpl |
registerServiceAssembly(org.osgi.framework.Bundle bundle,
ServiceAssemblyDesc serviceAssemblyDesc,
List<ServiceUnitImpl> sus)
|
SharedLibraryImpl |
registerSharedLibrary(org.osgi.framework.Bundle bundle,
SharedLibraryDesc sharedLibraryDesc,
ClassLoader classLoader)
|
void |
setAutoStart(boolean autoStart)
|
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext)
|
void |
setEndpointListener(AssemblyReferencesListener endpointListener)
|
void |
setEnvironment(org.apache.servicemix.jbi.runtime.Environment environment)
|
void |
setJmxManaged(AbstractInstaller installer)
|
void |
setShutdownTimeout(int shutdownTimeout)
|
protected void |
unregisterComponent(ComponentImpl component)
|
protected void |
unregisterDeployedComponent(org.osgi.framework.ServiceReference reference,
javax.jbi.component.Component component)
|
void |
unregisterDeployedServiceAssembly(org.osgi.framework.ServiceReference reference,
org.apache.servicemix.common.osgi.DeployedAssembly assembly)
|
protected void |
unregisterServiceAssembly(ServiceAssemblyImpl assembly)
|
protected void |
unregisterServices(org.osgi.framework.Bundle bundle)
|
protected void |
unregisterSharedLibrary(SharedLibrary library)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final String NAME
- See Also:
- Constant Field Values
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
TYPE_SERVICE_ENGINE
public static final String TYPE_SERVICE_ENGINE
- See Also:
- Constant Field Values
TYPE_BINDING_COMPONENT
public static final String TYPE_BINDING_COMPONENT
- See Also:
- Constant Field Values
Deployer
public Deployer()
throws javax.jbi.JBIException
- Throws:
javax.jbi.JBIException
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
isAutoStart
public boolean isAutoStart()
setAutoStart
public void setAutoStart(boolean autoStart)
setEndpointListener
public void setEndpointListener(AssemblyReferencesListener endpointListener)
getEndpointListener
public AssemblyReferencesListener getEndpointListener()
setEnvironment
public void setEnvironment(org.apache.servicemix.jbi.runtime.Environment environment)
getEnvironment
public org.apache.servicemix.jbi.runtime.Environment getEnvironment()
getJmxManaged
protected AbstractInstaller getJmxManaged()
setJmxManaged
public void setJmxManaged(AbstractInstaller installer)
getSharedLibraries
public Map<String,SharedLibraryImpl> getSharedLibraries()
getComponents
public Map<String,ComponentImpl> getComponents()
getServiceAssemblies
public Map<String,ServiceAssemblyImpl> getServiceAssemblies()
getSharedLibrary
public SharedLibraryImpl getSharedLibrary(String name)
getComponent
public ComponentImpl getComponent(String name)
getServiceAssembly
public ServiceAssemblyImpl getServiceAssembly(String name)
setShutdownTimeout
public void setShutdownTimeout(int shutdownTimeout)
getShutdownTimeout
public int getShutdownTimeout()
init
public void init()
throws Exception
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Throws:
Exception
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
- Specified by:
bundleChanged in interface org.osgi.framework.BundleListener
match
protected boolean match(org.osgi.framework.Bundle bundle)
onBundleStarted
protected void onBundleStarted(org.osgi.framework.Bundle bundle)
- Callback called when a new bundle has been started.
This method will check if the bundle is a JBI artifact and will process it accordingly.
- Parameters:
bundle -
onBundleStopping
protected void onBundleStopping(org.osgi.framework.Bundle bundle)
onBundleUninstalled
protected void onBundleUninstalled(org.osgi.framework.Bundle bundle)
createServiceUnit
public ServiceUnitImpl createServiceUnit(ServiceUnitDesc sud,
File suRootDir,
ComponentImpl component)
registerSharedLibrary
public SharedLibraryImpl registerSharedLibrary(org.osgi.framework.Bundle bundle,
SharedLibraryDesc sharedLibraryDesc,
ClassLoader classLoader)
throws Exception
- Throws:
Exception
registerComponent
public ComponentImpl registerComponent(org.osgi.framework.Bundle bundle,
ComponentDesc componentDesc,
javax.jbi.component.Component innerComponent,
SharedLibrary[] sharedLibraries)
throws Exception
- Throws:
Exception
registerServiceAssembly
public ServiceAssemblyImpl registerServiceAssembly(org.osgi.framework.Bundle bundle,
ServiceAssemblyDesc serviceAssemblyDesc,
List<ServiceUnitImpl> sus)
throws Exception
- Throws:
Exception
unregisterComponent
protected void unregisterComponent(ComponentImpl component)
unregisterServiceAssembly
protected void unregisterServiceAssembly(ServiceAssemblyImpl assembly)
unregisterSharedLibrary
protected void unregisterSharedLibrary(SharedLibrary library)
getInstaller
public AbstractInstaller getInstaller(Object o)
getStorage
public Storage getStorage(String name)
checkPendingInstallers
protected void checkPendingInstallers()
checkPendingAssemblies
protected void checkPendingAssemblies()
lifeCycleChanged
public void lifeCycleChanged(LifeCycleEvent event)
throws javax.jbi.JBIException
- Specified by:
lifeCycleChanged in interface LifeCycleListener
- Throws:
javax.jbi.JBIException
registerDeployedComponent
protected void registerDeployedComponent(org.osgi.framework.ServiceReference reference,
javax.jbi.component.Component component)
- Register an already deployed JBI component.
If the component has been deployed using a JBI packaging, the deployer should already have
registered it, so it will do nothing. If the component has been deployed directly through
an OSGi packaging (by simply registering the component in the OSGi registry), the deployer
will perform the needed tasks.
- Parameters:
reference - component -
unregisterDeployedComponent
protected void unregisterDeployedComponent(org.osgi.framework.ServiceReference reference,
javax.jbi.component.Component component)
registerDeployedServiceAssembly
public void registerDeployedServiceAssembly(org.osgi.framework.ServiceReference reference,
org.apache.servicemix.common.osgi.DeployedAssembly assembly)
unregisterDeployedServiceAssembly
public void unregisterDeployedServiceAssembly(org.osgi.framework.ServiceReference reference,
org.apache.servicemix.common.osgi.DeployedAssembly assembly)
registerService
protected void registerService(org.osgi.framework.Bundle bundle,
String clazz,
Object service,
Dictionary props)
- Register and keep track of an OSGi service
- Parameters:
bundle - clazz - service - props -
registerService
protected void registerService(org.osgi.framework.Bundle bundle,
String[] clazz,
Object service,
Dictionary props)
unregisterServices
protected void unregisterServices(org.osgi.framework.Bundle bundle)
Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.