it.imolinfo.jbi4corba.jbi.component
Class Jbi4CorbaSUManager

java.lang.Object
  extended by it.imolinfo.jbi4corba.jbi.component.runtime.DefaultServiceUnitManager
      extended by it.imolinfo.jbi4corba.jbi.component.Jbi4CorbaSUManager
All Implemented Interfaces:
javax.jbi.component.ServiceUnitManager

public class Jbi4CorbaSUManager
extends DefaultServiceUnitManager

Jbi4Corba Service Unit Manager. Redefines: deploy/implement (no init).

Author:
Marco Piraccini
See Also:
for more details of the generated code.

Constructor Summary
Jbi4CorbaSUManager(ComponentRuntime ctx)
          Constructor that takes the ComponentRuntime parameter.
 
Method Summary
protected  JbiServiceDescriptor createServiceDescriptor(javax.wsdl.Service service, javax.wsdl.Binding binding, javax.wsdl.PortType portType, Jbi4CorbaAddress addressExtension, Jbi4CorbaBinding bindingExtension, String role, String rootPath)
          Creates the JbiServiceDescriptor from the extended WSDL-element.
 void deactivateEndpoint(Jbi4CorbaEndpoint endpoint)
          Activate the endpoint array.
 String deploy(String suName, String suZipPath)
          Deploy a Service Unit to the component.
 Jbi4CorbaEndpoint getDeployedEndpoint(javax.jbi.servicedesc.ServiceEndpoint endpoint)
          Returns the endpoint from using ServiceEndpoint from the deployed endpoint list.
 List<Jbi4CorbaEndpoint> getDeployedEndpoints()
          Gets the deployed endpoints.
 Jbi4CorbaLifeCycle getLifeCycle()
          Gets the life cycle.
 Jbi4CorbaEndpoint getStartedEndpoint(javax.jbi.servicedesc.ServiceEndpoint endpoint)
          Returns the endpoint from using ServiceEndpoint from the started endpoint list.
 void init(String serviceUnitName, String serviceUnitRootPath)
          Service unit init, process the Endpoint deploy.
 Map<String,String[]> parseForEnvironmentVariables(String suPath, Map<String,String[]> envVariableMap)
           
static javax.wsdl.Definition readWsdl(File f)
          Reads a Definition from a File.
 void setLifeCycle(Jbi4CorbaLifeCycle lifeCycle)
          Sets the life cycle.
 void shutDown(String serviceUnitName)
          Service unit shutdown, removes the deployed endpoint.
 void start(String serviceUnitName)
          Start the deployed service unit.
 void stop(String serviceUnitName)
          Stop the service unit.
 String undeploy(String serviceUnitName, String suZipPath)
          Undeploy a service unit from the component.
 
Methods inherited from class it.imolinfo.jbi4corba.jbi.component.runtime.DefaultServiceUnitManager
createComponentTaskResultXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jbi4CorbaSUManager

public Jbi4CorbaSUManager(ComponentRuntime ctx)
Constructor that takes the ComponentRuntime parameter.

Parameters:
ctx - the component runtime context
Method Detail

deploy

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

Parameters:
suName - the service unit name
suZipPath - the service unit unzip path
Returns:
the xml message string
Throws:
javax.jbi.management.DeploymentException - if some deploy problem occurs
See Also:
ServiceUnitManager.deploy(String, String);

start

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

Parameters:
serviceUnitName - the service unit name
Throws:
javax.jbi.management.DeploymentException - if some problem occurs
See Also:
ServiceUnitManager.start(String);

undeploy

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

Parameters:
suZipPath - the service unit unzip path
serviceUnitName - the service unit name
Returns:
the xml result message
Throws:
javax.jbi.management.DeploymentException - if some problem occurs
See Also:
ServiceUnitManager.undeploy(String, String);

stop

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

Parameters:
serviceUnitName - the service unit name
Throws:
javax.jbi.management.DeploymentException - if some problem occurs

init

public void init(String serviceUnitName,
                 String serviceUnitRootPath)
          throws javax.jbi.management.DeploymentException
Service unit init, process the Endpoint deploy.

Parameters:
serviceUnitName - the service unit name
serviceUnitRootPath - the service unit root path
Throws:
javax.jbi.management.DeploymentException - if some problem occurs

shutDown

public void shutDown(String serviceUnitName)
              throws javax.jbi.management.DeploymentException
Service unit shutdown, removes the deployed endpoint.

Parameters:
serviceUnitName - the service unit name
Throws:
javax.jbi.management.DeploymentException - if some problem occurs
See Also:
javax.jbi.component.ServiceUnitManager#shutdown(String);

getStartedEndpoint

public Jbi4CorbaEndpoint getStartedEndpoint(javax.jbi.servicedesc.ServiceEndpoint endpoint)
Returns the endpoint from using ServiceEndpoint from the started endpoint list.

Parameters:
endpoint - the ServiceEndpoint
Returns:
the Jbi4CorbaEndpoint if found, null otherwise

getDeployedEndpoint

public Jbi4CorbaEndpoint getDeployedEndpoint(javax.jbi.servicedesc.ServiceEndpoint endpoint)
Returns the endpoint from using ServiceEndpoint from the deployed endpoint list.

Parameters:
endpoint - the ServiceEndpoint
Returns:
the Jbi4CorbaEndpoint if found, null otherwise

parseForEnvironmentVariables

public Map<String,String[]> parseForEnvironmentVariables(String suPath,
                                                         Map<String,String[]> envVariableMap)
                                                  throws Jbi4CorbaRuntimeException
Throws:
Jbi4CorbaRuntimeException

deactivateEndpoint

public void deactivateEndpoint(Jbi4CorbaEndpoint endpoint)
                        throws Jbi4CorbaDeployException
Activate the endpoint array.

Parameters:
endpoint - the endpoints to deactivate
Throws:
Jbi4CorbaDeployException - if some deployment problem occurs

readWsdl

public static javax.wsdl.Definition readWsdl(File f)
                                      throws javax.wsdl.WSDLException
Reads a Definition from a File.

Parameters:
f - the file to read
Returns:
the WSDL definition
Throws:
javax.wsdl.WSDLException - if there are problem in reading the WSDL

getLifeCycle

public Jbi4CorbaLifeCycle getLifeCycle()
Gets the life cycle.

Returns:
the life cycle

setLifeCycle

public void setLifeCycle(Jbi4CorbaLifeCycle lifeCycle)
Sets the life cycle.

Parameters:
lifeCycle - the new life cycle

getDeployedEndpoints

public List<Jbi4CorbaEndpoint> getDeployedEndpoints()
Gets the deployed endpoints.

Returns:
the deployed endpoints

createServiceDescriptor

protected JbiServiceDescriptor createServiceDescriptor(javax.wsdl.Service service,
                                                       javax.wsdl.Binding binding,
                                                       javax.wsdl.PortType portType,
                                                       Jbi4CorbaAddress addressExtension,
                                                       Jbi4CorbaBinding bindingExtension,
                                                       String role,
                                                       String rootPath)
                                                throws javax.jbi.management.DeploymentException
Creates the JbiServiceDescriptor from the extended WSDL-element. Creates also the idl file loaded from WSDL in the roortpath populating the JbiServiceDescriptor with the idlFileName and the idlFileNameDirectory.

Parameters:
service - The service
port - The port
binding - The binding
addressExtension - The address extension
bindingExtension - The binding extension
rootPath - The root path
Returns:
The JbiServiceDescriptor created.
Throws:
javax.jbi.management.DeploymentException - The deployment exception


Copyright © 2005-2010 Imola Informatica. All Rights Reserved.