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

java.lang.Object
  extended by org.apache.servicemix.jbi.deployer.artifacts.AbstractLifecycleJbiArtifact
      extended by org.apache.servicemix.jbi.deployer.artifacts.ServiceAssemblyImpl
All Implemented Interfaces:
javax.jbi.management.LifeCycleMBean, ServiceAssembly, Nameable

public class ServiceAssemblyImpl
extends AbstractLifecycleJbiArtifact
implements ServiceAssembly, Nameable

ServiceAssembly object


Nested Class Summary
 
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
ServiceAssemblyImpl(org.osgi.framework.Bundle bundle, ServiceAssemblyDesc serviceAssemblyDesc, java.util.List<ServiceUnitImpl> serviceUnits, org.osgi.service.prefs.Preferences prefs, AssemblyReferencesListener listener, boolean autoStart)
           
 
Method Summary
protected  void changeState(ServiceUnitImpl su, org.apache.servicemix.jbi.deployer.artifacts.ServiceAssemblyImpl.Action action)
           
protected  void checkComponentsStarted()
           
 void forceShutDown()
          Force a shutdown of this service assembly
 org.osgi.framework.Bundle getBundle()
           
 java.lang.String getDescription()
          Retrieves the description of this service assembly
 java.lang.String getDescriptor()
          Retrieve the JBI descriptor for this service assembly
 java.lang.String getMainType()
           
 java.lang.String getName()
          Retrieves the name of this service assembly
 java.lang.String getParent()
           
 java.lang.Class getPrimaryInterface()
           
 ServiceUnit[] getServiceUnits()
          Get the list of service units included in this Service Assembly
 java.util.List<ServiceUnitImpl> getServiceUnitsList()
           
 java.lang.String getSubType()
           
 java.lang.String getVersion()
           
 void init()
           
protected  org.osgi.framework.ServiceRegistration registerWire(Wire wire)
           
 void setShutdownTimeout(int shutdownTimeout)
           
 void shutDown()
           
 void shutDown(boolean persist, boolean force)
           
 void start()
           
 void start(boolean persist)
           
 void stop()
           
 void stop(boolean persist)
           
 java.lang.String toString()
           
protected  void transition(org.apache.servicemix.jbi.deployer.artifacts.ServiceAssemblyImpl.Action action, AbstractLifecycleJbiArtifact.State to)
           
 
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

ServiceAssemblyImpl

public ServiceAssemblyImpl(org.osgi.framework.Bundle bundle,
                           ServiceAssemblyDesc serviceAssemblyDesc,
                           java.util.List<ServiceUnitImpl> serviceUnits,
                           org.osgi.service.prefs.Preferences prefs,
                           AssemblyReferencesListener listener,
                           boolean autoStart)
Method Detail

getBundle

public org.osgi.framework.Bundle getBundle()

getName

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

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

getDescription

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

Specified by:
getDescription in interface ServiceAssembly
Returns:
the description

getDescriptor

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

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

getServiceUnits

public ServiceUnit[] getServiceUnits()
Description copied from interface: ServiceAssembly
Get the list of service units included in this Service Assembly

Specified by:
getServiceUnits in interface ServiceAssembly
Returns:

getServiceUnitsList

public java.util.List<ServiceUnitImpl> getServiceUnitsList()

setShutdownTimeout

public void setShutdownTimeout(int shutdownTimeout)

init

public void init()
          throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

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 persist)
           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

stop

public void stop(boolean persist)
          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: ServiceAssembly
Force a shutdown of this service assembly

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

shutDown

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

checkComponentsStarted

protected void checkComponentsStarted()
                               throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

transition

protected void transition(org.apache.servicemix.jbi.deployer.artifacts.ServiceAssemblyImpl.Action action,
                          AbstractLifecycleJbiArtifact.State to)
                   throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

changeState

protected void changeState(ServiceUnitImpl su,
                           org.apache.servicemix.jbi.deployer.artifacts.ServiceAssemblyImpl.Action action)
                    throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

registerWire

protected org.osgi.framework.ServiceRegistration registerWire(Wire wire)

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()
Specified by:
getMainType in interface Nameable

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.