|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.jbi.management.BaseLifeCycle
org.apache.servicemix.jbi.management.BaseSystemService
org.apache.servicemix.jbi.framework.DeploymentService
public class DeploymentService
The deployment service MBean allows administrative tools to manage service assembly deployments.
| Field Summary |
|---|
| Fields inherited from class org.apache.servicemix.jbi.management.BaseSystemService |
|---|
container |
| Fields inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle |
|---|
currentState, INITIALIZED, listener |
| Fields inherited from interface javax.jbi.management.DeploymentServiceMBean |
|---|
SHUTDOWN, STARTED, STOPPED |
| Fields inherited from interface javax.jbi.management.LifeCycleMBean |
|---|
SHUTDOWN, STARTED, STOPPED, UNKNOWN |
| Constructor Summary | |
|---|---|
DeploymentService()
|
|
| Method Summary | |
|---|---|
protected void |
buildState()
Find runnning state and things deployed before shutdown |
boolean |
canDeployToComponent(String componentName)
Returns a boolean value indicating whether the SU can be deployed to a component. |
protected void |
checkSus(File saDirectory,
ServiceUnit[] sus)
|
String |
deploy(String saZipURL)
Deploys the given SA to the JBI environment. |
protected String |
deployServiceAssembly(File tmpDir,
ServiceAssembly sa)
Deploy an SA |
MBeanAttributeInfo[] |
getAttributeInfos()
Get an array of MBeanAttributeInfo |
protected Element |
getChildElement(Element element,
String name)
|
String[] |
getComponentsForDeployedServiceAssembly(String saName)
Returns a list of components(to which SUs are targeted for) in a Service Assembly. |
protected void |
getComponentTaskError(Exception exception,
String component,
List<Element> results)
|
protected boolean |
getComponentTaskResult(String resultMsg,
String component,
List<Element> results,
boolean success)
|
String[] |
getDeployedServiceAssemblies()
Returns a list of Service Assemblies deployed to the JBI enviroment. |
String[] |
getDeployedServiceAssembliesForComponent(String componentName)
Returns a list of Service Assemblies that contain SUs for the given component. |
String[] |
getDeployedServiceUnitList(String componentName)
Returns a list of Service Units that are currently deployed to the given component. |
String |
getDescription()
Get the description |
protected Element |
getElement(Document doc,
String name)
|
MBeanOperationInfo[] |
getOperationInfos()
Get an array of MBeanOperationInfo |
String |
getServiceAssemblyDescriptor(String saName)
Returns the descriptor of the Service Assembly that was deployed to the JBI enviroment. |
protected Class<javax.jbi.management.DeploymentServiceMBean> |
getServiceMBean()
|
String |
getState(String serviceAssemblyName)
Returns the state of service assembly. |
void |
init(JBIContainer container)
Initialize the Service |
boolean |
isDeployedServiceUnit(String componentName,
String suName)
Returns a boolean value indicating whether the SU is currently deployed. |
protected boolean |
isSaDeployed(String serviceAssemblyName)
See if an Sa is already deployed |
protected Document |
parse(String result)
|
String |
shutDown(String serviceAssemblyName)
Shutdown the service assembly and puts it in SHUTDOWN state. |
void |
start()
Start the item. |
String |
start(String serviceAssemblyName)
Starts the service assembly and puts it in STARTED state. |
String |
stop(String serviceAssemblyName)
Stops the service assembly and puts it in STOPPED state. |
String |
undeploy(String saName)
Undeploys the given SA from the JBI environment. |
protected void |
undeployServiceUnit(ServiceUnitLifeCycle su)
|
| Methods inherited from class org.apache.servicemix.jbi.management.BaseSystemService |
|---|
getContainer, getName, getType, shutDown |
| Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle |
|---|
firePropertyChanged, getCurrentState, getObjectToManage, getSubType, init, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeploymentService()
| Method Detail |
|---|
public void init(JBIContainer container)
throws javax.jbi.JBIException
init in class BaseSystemServicecontainer -
javax.jbi.JBIException
javax.jbi.management.DeploymentExceptionprotected Class<javax.jbi.management.DeploymentServiceMBean> getServiceMBean()
getServiceMBean in class BaseSystemService
public void start()
throws javax.jbi.JBIException
BaseLifeCycle
start in interface javax.jbi.management.LifeCycleMBeanstart in class BaseLifeCyclejavax.jbi.JBIException - if the item fails to start.
public MBeanAttributeInfo[] getAttributeInfos()
throws JMException
getAttributeInfos in interface MBeanInfoProvidergetAttributeInfos in class BaseLifeCycleJMException
public MBeanOperationInfo[] getOperationInfos()
throws JMException
getOperationInfos in interface MBeanInfoProvidergetOperationInfos in class BaseLifeCycleJMExceptionpublic String getDescription()
getDescription in interface MBeanInfoProvider
public String deploy(String saZipURL)
throws Exception
deploy in interface javax.jbi.management.DeploymentServiceMBeansaZipURL - String containing the location of the Service Assembly zip file.
Exception - in xml format if complete deployment fails.
public String undeploy(String saName)
throws Exception
undeploy in interface javax.jbi.management.DeploymentServiceMBeansaName - name of the SA that has to be undeployed.
Exception - if compelete undeployment fails.
public String[] getDeployedServiceUnitList(String componentName)
throws Exception
getDeployedServiceUnitList in interface javax.jbi.management.DeploymentServiceMBeancomponentName - name of the component.
Exception
public String[] getDeployedServiceAssemblies()
throws Exception
getDeployedServiceAssemblies in interface javax.jbi.management.DeploymentServiceMBeanException
public String getServiceAssemblyDescriptor(String saName)
throws Exception
getServiceAssemblyDescriptor in interface javax.jbi.management.DeploymentServiceMBeansaName - name of the service assembly.
Exception
public String[] getDeployedServiceAssembliesForComponent(String componentName)
throws Exception
getDeployedServiceAssembliesForComponent in interface javax.jbi.management.DeploymentServiceMBeancomponentName - name of the component.
Exception - if unable to retrieve service assembly list.
public String[] getComponentsForDeployedServiceAssembly(String saName)
throws Exception
getComponentsForDeployedServiceAssembly in interface javax.jbi.management.DeploymentServiceMBeansaName - name of the service assembly.
Exception - if unable to retrieve component list.
public boolean isDeployedServiceUnit(String componentName,
String suName)
throws Exception
isDeployedServiceUnit in interface javax.jbi.management.DeploymentServiceMBeancomponentName - - name of component.suName - - name of the Service Unit.
Exception - if unable to return status of service unit.public boolean canDeployToComponent(String componentName)
canDeployToComponent in interface javax.jbi.management.DeploymentServiceMBeancomponentName - - name of the component.
public String start(String serviceAssemblyName)
throws Exception
start in interface javax.jbi.management.DeploymentServiceMBeanserviceAssemblyName - - name of the service assembly.
Exception - if operation fails.
public String stop(String serviceAssemblyName)
throws Exception
stop in interface javax.jbi.management.DeploymentServiceMBeanserviceAssemblyName - - name of the service assembly.
Exception - if operation fails.
public String shutDown(String serviceAssemblyName)
throws Exception
shutDown in interface javax.jbi.management.DeploymentServiceMBeanserviceAssemblyName - - name of the service assembly.
Exception - if operation fails.
public String getState(String serviceAssemblyName)
throws Exception
getState in interface javax.jbi.management.DeploymentServiceMBeanserviceAssemblyName - - name of the service assembly.
Exception - if operation fails.protected boolean isSaDeployed(String serviceAssemblyName)
serviceAssemblyName - - name of the service assembly.
protected String deployServiceAssembly(File tmpDir,
ServiceAssembly sa)
throws Exception
tmpDir - sa -
Exception - in xml format
protected void checkSus(File saDirectory,
ServiceUnit[] sus)
throws Exception
Exception
protected void getComponentTaskError(Exception exception,
String component,
List<Element> results)
protected boolean getComponentTaskResult(String resultMsg,
String component,
List<Element> results,
boolean success)
protected Document parse(String result)
throws ParserConfigurationException,
SAXException,
IOException
ParserConfigurationException
SAXException
IOException
protected Element getElement(Document doc,
String name)
protected Element getChildElement(Element element,
String name)
protected void undeployServiceUnit(ServiceUnitLifeCycle su)
throws javax.jbi.management.DeploymentException
javax.jbi.management.DeploymentExceptionprotected void buildState()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||