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
 class SoapComponentContext.ServiceManager<E>
           
 
Field Summary
protected  org.ow2.petals.ws.notification.WsnManager wsnManager
          The web service notification manager
 
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
 ServiceClient 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, java.lang.String rampartUserName)
           Get a service client associated to an axis service set with the good operation.
 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.
 org.ow2.petals.ws.notification.WsnManager getWsnManager()
           
 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, ServiceClient serviceClient, 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.
 void setWsnManager(org.ow2.petals.ws.notification.WsnManager wsnManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wsnManager

protected org.ow2.petals.ws.notification.WsnManager wsnManager
The web service notification manager

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 -

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

removeJbiDescriptor

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

Parameters:
address -

addServiceDescriptor

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

Parameters:
address -
jbiDescriptor -

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

removeServiceDescriptor

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

Parameters:
address -

getWsnManager

public org.ow2.petals.ws.notification.WsnManager getWsnManager()
Returns:
the notificationManager

setWsnManager

public void setWsnManager(org.ow2.petals.ws.notification.WsnManager wsnManager)
Parameters:
wsnManager - the notificationManager to set

getComponentConfiguration

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

setComponentConfiguration

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

borrowServiceClient

public ServiceClient 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,
                                         java.lang.String rampartUserName)
                                  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, ServiceClient) .

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
ramprtUserName -
Returns:
a ServiceClient. Not null. Must be returned to the pool after usage using API: #returnServiceClient(String, QName, URI, ServiceClient)
Throws:
HandlingException
javax.jbi.messaging.MessagingException

returnServiceClient

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

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

getAxis2ConfigurationContext

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

setAxis2ConfigurationContext

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

getConsumersManager

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

getProvidersManager

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

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.

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.

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.

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.

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.

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.


Copyright © 2005-2010 OW2 Consortium. All Rights Reserved.