it.imolinfo.jbi4cics.jbi
Class Jbi4cicsWSDLDeployer

java.lang.Object
  extended by org.apache.servicemix.common.AbstractDeployer
      extended by it.imolinfo.jbi4cics.jbi.Jbi4cicsWSDLDeployer
All Implemented Interfaces:
org.apache.servicemix.common.Deployer

public final class Jbi4cicsWSDLDeployer
extends org.apache.servicemix.common.AbstractDeployer

Deployer for the Jbi4cics JBI component. Deploys all the WSDL containing a Jbi4Cics extension.

Author:
marcopiraccini, Marco Cimatti

Field Summary
 
Fields inherited from class org.apache.servicemix.common.AbstractDeployer
component, logger
 
Constructor Summary
Jbi4cicsWSDLDeployer(org.apache.servicemix.common.BaseComponent component)
          Creates a Jbi4cicsWSDLDeployer for the specified component.
 
Method Summary
 boolean canDeploy(java.lang.String suName, java.lang.String suRootPath)
          Check if this deployer is able to handle a given artifact.
protected  Jbi4cicsEndpoint createServiceDescriptor(javax.wsdl.Service service, javax.wsdl.Port port, javax.wsdl.Binding binding, Jbi4CicsAddress addressExtension, Jbi4CicsBinding bindingExtension)
          Creates the Jbi4cicsEndpoint from the extended WSDL-element.
 org.apache.servicemix.common.ServiceUnit deploy(java.lang.String suName, java.lang.String suRootPath)
          Actually deploys the given service unit and build a ServiceUnit object that contains endpoints.
 java.util.List<Jbi4cicsEndpoint> getEndpointFromWsdl(java.io.File wsdl)
          Reads the Jbi4cicsEndpoint list from the WSDL.
protected  void validate(org.apache.servicemix.common.Endpoint endpoint)
          Validates the specified endpoint.
 
Methods inherited from class org.apache.servicemix.common.AbstractDeployer
failure, undeploy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jbi4cicsWSDLDeployer

public Jbi4cicsWSDLDeployer(org.apache.servicemix.common.BaseComponent component)
Creates a Jbi4cicsWSDLDeployer for the specified component.

Parameters:
component - the component to be deployed by this instance.
Method Detail

canDeploy

public boolean canDeploy(java.lang.String suName,
                         java.lang.String suRootPath)
Check if this deployer is able to handle a given artifact.

Parameters:
suName - the name of the service unit.
suRootPath - the path of the exploded service unit.
Returns:
true if this deployer can handle the given artifact.

deploy

public org.apache.servicemix.common.ServiceUnit deploy(java.lang.String suName,
                                                       java.lang.String suRootPath)
                                                throws javax.jbi.management.DeploymentException
Actually deploys the given service unit and build a ServiceUnit object that contains endpoints.

Parameters:
suName - the name of the service unit
suRootPath - the path of the exploded service unit
Returns:
a service unit containing endpoints
Throws:
javax.jbi.management.DeploymentException - if an error occurs

validate

protected void validate(org.apache.servicemix.common.Endpoint endpoint)
                 throws javax.jbi.management.DeploymentException
Validates the specified endpoint. This implementation does nothing.

Overrides:
validate in class org.apache.servicemix.common.AbstractDeployer
Parameters:
endpoint - the endpoint to validate.
Throws:
javax.jbi.management.DeploymentException - in general, if endpoint can't be validated but this implementation never throw this kind of exception.

getEndpointFromWsdl

public java.util.List<Jbi4cicsEndpoint> getEndpointFromWsdl(java.io.File wsdl)
                                                     throws javax.jbi.management.DeploymentException
Reads the Jbi4cicsEndpoint list from the WSDL.

Parameters:
wsdl - the WSDL file. Must be not null.
Returns:
the loaded endpoint list, never empty.
Throws:
javax.jbi.management.DeploymentException - in case of errors.

createServiceDescriptor

protected Jbi4cicsEndpoint createServiceDescriptor(javax.wsdl.Service service,
                                                   javax.wsdl.Port port,
                                                   javax.wsdl.Binding binding,
                                                   Jbi4CicsAddress addressExtension,
                                                   Jbi4CicsBinding bindingExtension)
                                            throws javax.jbi.management.DeploymentException
Creates the Jbi4cicsEndpoint from the extended WSDL-element.

Parameters:
service - the WSDL service.
port - the WSDL port.
binding - the WSDL binding.
addressExtension - the Jbi4Cics address extension.
bindingExtension - the Jbi4Cics binding extension.
Returns:
the new Jbi4cicsEndpoint created from the extended WSDL-element.
Throws:
javax.jbi.management.DeploymentException - if the operation number read from the binding differs from 1.


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