org.apache.servicemix.jbi.deployer.artifacts
Class ComponentImpl

java.lang.Object
  extended by org.apache.servicemix.jbi.deployer.artifacts.AbstractLifecycleJbiArtifact
      extended by org.apache.servicemix.jbi.deployer.artifacts.ComponentImpl
All Implemented Interfaces:
javax.jbi.management.ComponentLifeCycleMBean, javax.jbi.management.LifeCycleMBean, Component, ComponentWrapper, Nameable

public class ComponentImpl
extends AbstractLifecycleJbiArtifact
implements Component, ComponentWrapper, Nameable


Nested Class Summary
protected  class ComponentImpl.ComponentWrapper
           
 
Nested classes/interfaces inherited from class org.apache.servicemix.jbi.deployer.artifacts.AbstractLifecycleJbiArtifact
AbstractLifecycleJbiArtifact.State
 
Field Summary
 
Fields inherited from class org.apache.servicemix.jbi.deployer.artifacts.AbstractLifecycleJbiArtifact
listenerRegistry, LOGGER, prefs, runningState, state, STATE
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
SHUTDOWN, STARTED, STOPPED, UNKNOWN
 
Constructor Summary
ComponentImpl(org.osgi.framework.Bundle bundle, ComponentDesc componentDesc, javax.jbi.component.Component component, org.osgi.service.prefs.Preferences prefs, boolean autoStart, SharedLibrary[] sharedLibraries)
           
 
Method Summary
 void addServiceUnit(ServiceUnitImpl serviceUnit)
           
 void forceShutDown()
          Force a shutdown of this component
 org.osgi.framework.Bundle getBundle()
           
 javax.jbi.component.Component getComponent()
          Access to the JBI component
 java.lang.ClassLoader getComponentClassLoader()
           
 java.lang.String getDescription()
          Retrieves the description of this service assembly
 java.lang.String getDescriptor()
          Retrieve the JBI descriptor for this service assembly
 javax.management.ObjectName getExtensionMBeanName()
           
 java.lang.String getMainType()
          Return the type of this component (service-engine or binding-component)
 java.lang.String getName()
          Retrieves the name of this service assembly
 java.lang.String getParent()
           
 java.lang.Class getPrimaryInterface()
           
 java.util.Set<ServiceAssemblyImpl> getServiceAssemblies()
           
 ServiceUnit[] getServiceUnits()
          Retrieve the ServiceUnits deployed on this component
 SharedLibrary[] getSharedLibraries()
          Retrieve the Shared Libraries used by this component
 java.lang.String getSubType()
           
 java.lang.String getType()
           
 java.lang.String getVersion()
           
 void removeServiceUnit(ServiceUnitImpl serviceUnit)
           
 void shutDown()
           
 void shutDown(boolean saveState, boolean force)
           
 void start()
           
 void start(boolean saveState)
           
 void stop()
           
 void stop(boolean saveState)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.servicemix.jbi.deployer.artifacts.AbstractLifecycleJbiArtifact
fireEvent, fireEvent, getCurrentState, getListenerRegistry, getRunningState, getState, loadState, saveState, setListenerRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jbi.management.LifeCycleMBean
getCurrentState
 

Constructor Detail

ComponentImpl

public ComponentImpl(org.osgi.framework.Bundle bundle,
                     ComponentDesc componentDesc,
                     javax.jbi.component.Component component,
                     org.osgi.service.prefs.Preferences prefs,
                     boolean autoStart,
                     SharedLibrary[] sharedLibraries)
Method Detail

getComponentClassLoader

public java.lang.ClassLoader getComponentClassLoader()

addServiceUnit

public void addServiceUnit(ServiceUnitImpl serviceUnit)

removeServiceUnit

public void removeServiceUnit(ServiceUnitImpl serviceUnit)

getBundle

public org.osgi.framework.Bundle getBundle()

getServiceUnits

public ServiceUnit[] getServiceUnits()
Description copied from interface: Component
Retrieve the ServiceUnits deployed on this component

Specified by:
getServiceUnits in interface Component

getName

public java.lang.String getName()
Description copied from interface: Component
Retrieves the name of this service assembly

Specified by:
getName in interface Component
Specified by:
getName in interface Nameable
Returns:
the name

getDescription

public java.lang.String getDescription()
Description copied from interface: Component
Retrieves the description of this service assembly

Specified by:
getDescription in interface Component
Returns:
the description

getDescriptor

public java.lang.String getDescriptor()
Description copied from interface: Component
Retrieve the JBI descriptor for this service assembly

Specified by:
getDescriptor in interface Component
Returns:
the JBI descriptor

getType

public java.lang.String getType()

getExtensionMBeanName

public javax.management.ObjectName getExtensionMBeanName()
                                                  throws javax.jbi.JBIException
Specified by:
getExtensionMBeanName in interface javax.jbi.management.ComponentLifeCycleMBean
Throws:
javax.jbi.JBIException

getComponent

public javax.jbi.component.Component getComponent()
Description copied from interface: Component
Access to the JBI component

Specified by:
getComponent in interface Component
Specified by:
getComponent in interface ComponentWrapper

start

public void start()
           throws javax.jbi.JBIException
Specified by:
start in interface javax.jbi.management.LifeCycleMBean
Throws:
javax.jbi.JBIException

start

public void start(boolean saveState)
           throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

stop

public void stop()
          throws javax.jbi.JBIException
Specified by:
stop in interface javax.jbi.management.LifeCycleMBean
Throws:
javax.jbi.JBIException

getServiceAssemblies

public java.util.Set<ServiceAssemblyImpl> getServiceAssemblies()

getSharedLibraries

public SharedLibrary[] getSharedLibraries()
Description copied from interface: Component
Retrieve the Shared Libraries used by this component

Specified by:
getSharedLibraries in interface Component

stop

public void stop(boolean saveState)
          throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

shutDown

public void shutDown()
              throws javax.jbi.JBIException
Specified by:
shutDown in interface javax.jbi.management.LifeCycleMBean
Throws:
javax.jbi.JBIException

forceShutDown

public void forceShutDown()
                   throws javax.jbi.JBIException
Description copied from interface: Component
Force a shutdown of this component

Specified by:
forceShutDown in interface Component
Throws:
javax.jbi.JBIException

shutDown

public void shutDown(boolean saveState,
                     boolean force)
              throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getParent

public java.lang.String getParent()
Specified by:
getParent in interface Nameable

getMainType

public java.lang.String getMainType()
Description copied from interface: Component
Return the type of this component (service-engine or binding-component)

Specified by:
getMainType in interface Component
Specified by:
getMainType in interface Nameable
Returns:
the type

getSubType

public java.lang.String getSubType()
Specified by:
getSubType in interface Nameable

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface Nameable

getPrimaryInterface

public java.lang.Class getPrimaryInterface()
Specified by:
getPrimaryInterface in interface Nameable


Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.