org.ow2.petals.binding.soap
Class SoapComponentContext

java.lang.Object
  extended by org.ow2.petals.binding.soap.SoapComponentContext

public class SoapComponentContext
extends java.lang.Object

The SOAP component context. The context is filled by the SU listener (adding modules, service descriptions...) and used by the listeners/workers.

Author:
Christophe HAMERLING (chamerling) - eBMWebSourcing

Nested Class Summary
static class SoapComponentContext.ServiceManager<E>
           
 
Constructor Summary
SoapComponentContext(javax.jbi.component.ComponentContext context, org.ow2.petals.component.framework.jbidescriptor.generated.Component componentConfiguration, java.util.logging.Logger logger)
          Creates a new instance of SoapComponentContext
 
Method Summary
 void addJbiDescriptor(java.lang.String serviceUnitName, org.ow2.petals.component.framework.jbidescriptor.generated.Jbi jbiDescriptor)
          Add a JBIDescriptor
 void addServiceDescriptor(java.lang.String serviceUnitName, java.io.File serviceDescriptor)
          Add a JBIDescriptor
 PetalsServiceClient borrowServiceClient(java.lang.String address, javax.xml.namespace.QName operation, java.lang.String soapAction, java.net.URI mep, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions cdkExtensions, org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
           Get a service client associated to an axis service set with the good operation.
 void deleteServiceClientPools(org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
          Delete all the service client pools which used the provides instance
 org.apache.axis2.context.ConfigurationContext getAxis2ConfigurationContext()
           
 org.ow2.petals.component.framework.jbidescriptor.generated.Component getComponentConfiguration()
           
 SoapComponentContext.ServiceManager<org.ow2.petals.component.framework.jbidescriptor.generated.Consumes> getConsumersManager()
           
 org.ow2.petals.component.framework.jbidescriptor.generated.Jbi getJbiDescriptor(java.lang.String serviceUnitName)
          Get the JBI descriptor for the given address.
 java.lang.String getJmsConnectionFactoryName()
          The connection factory JNDI name used by the JMS transport layer.
 java.lang.String getJmsJndiInitialFactory()
          The JNDI initial factory used by the JMS transport layer.
 java.lang.String getJmsJndiProviderUrl()
          The JNDI provider URL used by the JMS transport layer.
 SoapComponentContext.ServiceManager<org.ow2.petals.component.framework.jbidescriptor.generated.Provides> getProvidersManager()
           
 java.io.File getServiceDescriptor(java.lang.String serviceUnitName)
          Get the service descriptor as File of the given service unit if available.
 void removeJbiDescriptor(java.lang.String serviceUnitName)
          Remove the JBIDescriptor for the given address
 void removeServiceDescriptor(java.lang.String serviceUnitName)
          Remove the JBIDescriptor for the given service unit
 void returnServiceClient(java.lang.String address, javax.xml.namespace.QName operation, java.net.URI mep, PetalsServiceClient petalsServiceClient, java.lang.String soapAction)
          Release the service client to the pool
 void setAxis2ConfigurationContext(org.apache.axis2.context.ConfigurationContext axis2ConfigurationContext)
           
 void setComponentConfiguration(org.ow2.petals.component.framework.jbidescriptor.generated.Component componentConfiguration)
           
 void setJmsConnectionFactoryName(java.lang.String jmsConnectionFactoryName)
          Set the connection factory JNDI name used by the JMS transport layer.
 void setJmsJndiInitialFactory(java.lang.String jmsJndiInitialFactory)
          Set the JNDI initial factory used by the JMS transport layer.
 void setJmsJndiProviderUrl(java.lang.String jmsJndiProviderUrl)
          Set the JNDI provider URL used by the JMS transport layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoapComponentContext

public SoapComponentContext(javax.jbi.component.ComponentContext context,
                            org.ow2.petals.component.framework.jbidescriptor.generated.Component componentConfiguration,
                            java.util.logging.Logger logger)
Creates a new instance of SoapComponentContext

Parameters:
context -
componentConfiguration -
logger -
Method Detail

addJbiDescriptor

public void addJbiDescriptor(java.lang.String serviceUnitName,
                             org.ow2.petals.component.framework.jbidescriptor.generated.Jbi jbiDescriptor)
Add a JBIDescriptor

Parameters:
address -
jbiDescriptor -

addServiceDescriptor

public void addServiceDescriptor(java.lang.String serviceUnitName,
                                 java.io.File serviceDescriptor)
Add a JBIDescriptor

Parameters:
address -
jbiDescriptor -

borrowServiceClient

public PetalsServiceClient borrowServiceClient(java.lang.String address,
                                               javax.xml.namespace.QName operation,
                                               java.lang.String soapAction,
                                               java.net.URI mep,
                                               org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions cdkExtensions,
                                               org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
                                        throws javax.jbi.messaging.MessagingException

Get a service client associated to an axis service set with the good operation. It is taken from a pool object.

This service client must be returned to the pool after usage using API: #returnServiceClient(String, QName, URI, PetalsServiceClient) .

Parameters:
address - the address of the service, mainly used as key to retrieve the associated SU.
operation - the target operation QName. Non null
mep - the message exchange pattern used. Non null
cdkExtensions - SU extensions used by the service client pool when the creation of a service client is needed
provides - the provides block of the endpoint which is creating the external WS call
Returns:
a ServiceClient. Not null. Must be returned to the pool after usage using API: #returnServiceClient(String, QName, URI, PetalsServiceClient)
Throws:
HandlingException
javax.jbi.messaging.MessagingException

getAxis2ConfigurationContext

public org.apache.axis2.context.ConfigurationContext getAxis2ConfigurationContext()
Returns:
the axis2ConfigurationContext

getComponentConfiguration

public org.ow2.petals.component.framework.jbidescriptor.generated.Component getComponentConfiguration()
Returns:

getConsumersManager

public SoapComponentContext.ServiceManager<org.ow2.petals.component.framework.jbidescriptor.generated.Consumes> getConsumersManager()
Returns:
the consumersManager

getJbiDescriptor

public org.ow2.petals.component.framework.jbidescriptor.generated.Jbi getJbiDescriptor(java.lang.String serviceUnitName)
Get the JBI descriptor for the given address.

Parameters:
address -
Returns:
the JBIDescriptor if found, else return null

getJmsConnectionFactoryName

public java.lang.String getJmsConnectionFactoryName()
The connection factory JNDI name used by the JMS transport layer.

Returns:
The connection factory JNDI name used by the JMS transport layer.

getJmsJndiInitialFactory

public java.lang.String getJmsJndiInitialFactory()
The JNDI initial factory used by the JMS transport layer.

Returns:
The JNDI initial factory used by the JMS transport layer.

getJmsJndiProviderUrl

public java.lang.String getJmsJndiProviderUrl()
The JNDI provider URL used by the JMS transport layer.

Returns:
The JNDI provider URL used by the JMS transport layer.

getProvidersManager

public SoapComponentContext.ServiceManager<org.ow2.petals.component.framework.jbidescriptor.generated.Provides> getProvidersManager()
Returns:
the providersManager

getServiceDescriptor

public java.io.File getServiceDescriptor(java.lang.String serviceUnitName)
Get the service descriptor as File of the given service unit if available.

Parameters:
address -
Returns:
the file (services.xml) or null if no service descriptor is available

removeJbiDescriptor

public void removeJbiDescriptor(java.lang.String serviceUnitName)
Remove the JBIDescriptor for the given address

Parameters:
address -

removeServiceDescriptor

public void removeServiceDescriptor(java.lang.String serviceUnitName)
Remove the JBIDescriptor for the given service unit

Parameters:
address -

deleteServiceClientPools

public void deleteServiceClientPools(org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
Delete all the service client pools which used the provides instance

Parameters:
provides -

returnServiceClient

public void returnServiceClient(java.lang.String address,
                                javax.xml.namespace.QName operation,
                                java.net.URI mep,
                                PetalsServiceClient petalsServiceClient,
                                java.lang.String soapAction)
                         throws javax.jbi.messaging.MessagingException
Release the service client to the pool

Parameters:
address -
operation -
mep -
petalsServiceClient -
Throws:
javax.jbi.messaging.MessagingException

setAxis2ConfigurationContext

public void setAxis2ConfigurationContext(org.apache.axis2.context.ConfigurationContext axis2ConfigurationContext)
Parameters:
axis2ConfigurationContext - the axis2ConfigurationContext to set

setComponentConfiguration

public void setComponentConfiguration(org.ow2.petals.component.framework.jbidescriptor.generated.Component componentConfiguration)
Parameters:
componentConfiguration -

setJmsConnectionFactoryName

public void setJmsConnectionFactoryName(java.lang.String jmsConnectionFactoryName)
Set the connection factory JNDI name used by the JMS transport layer.

Parameters:
jmsConnectionFactoryName - The connection factory JNDI name used by the JMS transport layer.

setJmsJndiInitialFactory

public void setJmsJndiInitialFactory(java.lang.String jmsJndiInitialFactory)
Set the JNDI initial factory used by the JMS transport layer.

Parameters:
jmsJndiInitialFactory - The JNDI initial factory used by the JMS transport layer.

setJmsJndiProviderUrl

public void setJmsJndiProviderUrl(java.lang.String jmsJndiProviderUrl)
Set the JNDI provider URL used by the JMS transport layer.

Parameters:
jmsJndiProviderUrl - The JNDI provider URL used by the JMS transport layer.


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.