it.imolinfo.jbi4ejb.jbi.component.runtime
Class DefaultServiceUnitManager

java.lang.Object
  extended by it.imolinfo.jbi4ejb.jbi.component.runtime.DefaultServiceUnitManager
All Implemented Interfaces:
javax.jbi.component.ServiceUnitManager
Direct Known Subclasses:
Jbi4EjbSUManager

public class DefaultServiceUnitManager
extends java.lang.Object
implements javax.jbi.component.ServiceUnitManager

Default Service Unit Manager implementation. Component's supporting the deployment should extend this class to support the service unit deployment.

Author:
Sun Microsystems, Inc.
See Also:
javax.jbi.ServiceUnitManager

Constructor Summary
DefaultServiceUnitManager(ComponentRuntime ctx)
          constructor that takes the compoent runtime
 
Method Summary
protected  java.lang.String createComponentTaskResultXML(java.lang.String message, boolean isSuccess)
          helper method to create result message in management message xml.
 java.lang.String deploy(java.lang.String suName, java.lang.String suZipPath)
          Deploy a Service Unit to the component.
 void init(java.lang.String serviceUnitName, java.lang.String serviceUnitRootPath)
          Initialize the given deployed service unit.
 void shutDown(java.lang.String serviceUnitName)
          Shut down the deployment.
 void start(java.lang.String serviceUnitName)
          Start the deployed service unit.
 void stop(java.lang.String serviceUnitName)
          Stop the deployed service unit.
 java.lang.String undeploy(java.lang.String suName, java.lang.String suZipPath)
          Undeploy a service unit from the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServiceUnitManager

public DefaultServiceUnitManager(ComponentRuntime ctx)
constructor that takes the compoent runtime

Method Detail

deploy

public java.lang.String deploy(java.lang.String suName,
                               java.lang.String suZipPath)
                        throws javax.jbi.management.DeploymentException
Deploy a Service Unit to the component.

Specified by:
deploy in interface javax.jbi.component.ServiceUnitManager
Throws:
javax.jbi.management.DeploymentException
See Also:
ServiceUnitManager.deploy(String, String);

undeploy

public java.lang.String undeploy(java.lang.String suName,
                                 java.lang.String suZipPath)
                          throws javax.jbi.management.DeploymentException
Undeploy a service unit from the component.

Specified by:
undeploy in interface javax.jbi.component.ServiceUnitManager
Throws:
javax.jbi.management.DeploymentException
See Also:
ServiceUnitManager.undeploy(String, String);

init

public void init(java.lang.String serviceUnitName,
                 java.lang.String serviceUnitRootPath)
          throws javax.jbi.management.DeploymentException
Initialize the given deployed service unit.

Specified by:
init in interface javax.jbi.component.ServiceUnitManager
Throws:
javax.jbi.management.DeploymentException
See Also:
ServiceUnitManager.init(String, String);

shutDown

public void shutDown(java.lang.String serviceUnitName)
              throws javax.jbi.management.DeploymentException
Shut down the deployment.

Specified by:
shutDown in interface javax.jbi.component.ServiceUnitManager
Throws:
javax.jbi.management.DeploymentException
See Also:
javax.jbi.component.ServiceUnitManager#shutdown(String);

start

public void start(java.lang.String serviceUnitName)
           throws javax.jbi.management.DeploymentException
Start the deployed service unit.

Specified by:
start in interface javax.jbi.component.ServiceUnitManager
Throws:
javax.jbi.management.DeploymentException
See Also:
ServiceUnitManager.start(String);

stop

public void stop(java.lang.String serviceUnitName)
          throws javax.jbi.management.DeploymentException
Stop the deployed service unit.

Specified by:
stop in interface javax.jbi.component.ServiceUnitManager
Throws:
javax.jbi.management.DeploymentException
See Also:
ServiceUnitManager.stop(String);

createComponentTaskResultXML

protected java.lang.String createComponentTaskResultXML(java.lang.String message,
                                                        boolean isSuccess)
helper method to create result message in management message xml.

Parameters:
message - message string to return
isSuccess - true to format a sucess result, false to format a failed result.
Returns:
XML string.


Copyright © 2007-2008 Imola Informatica. All Rights Reserved.