public class DefaultServiceUnit extends java.lang.Object implements ServiceUnit
| Modifier and Type | Field and Description |
|---|---|
protected ServiceMixComponent |
component |
protected java.util.Map<java.lang.String,Endpoint> |
endpoints |
protected java.lang.String |
name |
protected java.lang.String |
rootPath |
protected java.lang.String |
status |
| Constructor and Description |
|---|
DefaultServiceUnit() |
DefaultServiceUnit(ServiceMixComponent component) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEndpoint(Endpoint endpoint)
Adds an endpoint to this service unit.
|
ServiceMixComponent |
getComponent()
Retrieves the component where this SU is deployed.
|
java.lang.ClassLoader |
getConfigurationClassLoader()
Retrieve this service unit specific classloader.
|
java.lang.String |
getCurrentState()
Retrieve the state of this service unit.
|
Endpoint |
getEndpoint(java.lang.String key) |
java.util.Collection<Endpoint> |
getEndpoints()
Retrieves the list of deployed endpoints.
|
java.lang.String |
getName()
Retrieves the name of this service unit.
|
java.lang.String |
getRootPath()
Retrieves the root path of this service unit.
|
void |
init()
Puts the SU in a STOPPED state.
|
void |
removeEndpoint(Endpoint endpoint)
Removes an endpoint from this service unit.
|
void |
setComponent(ServiceMixComponent component) |
void |
setName(java.lang.String name) |
void |
setRootPath(java.lang.String rootPath) |
void |
shutDown()
Transition this service unit into the SHUTDOWN state.
|
void |
start()
Transition this service unit into the STARTED state.
|
void |
stop()
Transition this service unit to a STOPPED state.
|
protected ServiceMixComponent component
protected java.lang.String name
protected java.lang.String rootPath
protected java.lang.String status
protected java.util.Map<java.lang.String,Endpoint> endpoints
public DefaultServiceUnit()
public DefaultServiceUnit(ServiceMixComponent component)
public void init()
throws java.lang.Exception
ServiceUnitinit in interface ServiceUnitjava.lang.ExceptionEndpoint.start()public void start()
throws java.lang.Exception
ServiceUnitstart in interface ServiceUnitjava.lang.ExceptionEndpoint.start()public void stop()
throws java.lang.Exception
ServiceUnitstop in interface ServiceUnitjava.lang.ExceptionEndpoint.stop()public void shutDown()
throws java.lang.Exception
ServiceUnitshutDown in interface ServiceUnitjava.lang.ExceptionEndpoint.deactivate()public java.lang.String getCurrentState()
ServiceUnitgetCurrentState in interface ServiceUnitpublic java.lang.String getName()
ServiceUnitgetName in interface ServiceUnitpublic void setName(java.lang.String name)
public java.lang.String getRootPath()
ServiceUnitgetRootPath in interface ServiceUnitpublic void setRootPath(java.lang.String rootPath)
public ServiceMixComponent getComponent()
ServiceUnitgetComponent in interface ServiceUnitpublic void setComponent(ServiceMixComponent component)
component - The component to set.public java.util.Collection<Endpoint> getEndpoints()
ServiceUnitgetEndpoints in interface ServiceUnitpublic void addEndpoint(Endpoint endpoint) throws javax.jbi.management.DeploymentException
ServiceUnitaddEndpoint in interface ServiceUnitjavax.jbi.management.DeploymentExceptionpublic void removeEndpoint(Endpoint endpoint) throws javax.jbi.management.DeploymentException
ServiceUnitremoveEndpoint in interface ServiceUnitjavax.jbi.management.DeploymentExceptionpublic Endpoint getEndpoint(java.lang.String key)
public java.lang.ClassLoader getConfigurationClassLoader()
ServiceUnitgetConfigurationClassLoader in interface ServiceUnitCopyright © 2005-2014 FuseSource. All Rights Reserved.