it.imolinfo.jbi4corba.jbi.endpoint
Class ProviderEndpoint

java.lang.Object
  extended by it.imolinfo.jbi4corba.jbi.endpoint.Jbi4CorbaEndpoint
      extended by it.imolinfo.jbi4corba.jbi.endpoint.ProviderEndpoint
All Implemented Interfaces:
Serializable

public class ProviderEndpoint
extends Jbi4CorbaEndpoint

The Provider Endpoint.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class it.imolinfo.jbi4corba.jbi.endpoint.Jbi4CorbaEndpoint
RUNNING, SHUTDOWN, STOPPED
 
Constructor Summary
ProviderEndpoint(QName serviceName, String endpointName, ProviderServiceDescriptor serviceDescriptor)
          Instantiates a new jbi4 ejb provider endpoint.
 
Method Summary
 void activate()
          Activate the endpoint.
 void deactivate()
          Deactivate the endpoint.
protected  Object ejbLocalization(Class helperClass, Method extractMethod, Method narrowMethod, Method typeMethod)
           
protected  Document generateWsdl(org.apache.cxf.service.Service cxfService)
           
protected  Object getCorbaObjectReference(Class helperClass, Method narrowMethod, Object retrievedObject)
          This method is used to obtain a reference to the corba object.
 Object getCorbaObjectReference(String ior)
          This Method return narrowed Corba Object starting from the IOR
 org.apache.cxf.endpoint.Endpoint getCXFEndpoint()
           
 org.apache.cxf.service.Service getCXFService()
           
protected  Method getExtractMethod(Class helperClass)
           
 String getIorCorbaObject()
          Return the Ior for the corba object
protected  Method getNarrowMethod(Class helperClass)
          Gets the object that represent the method 'narrow' of the helper class.
 ORB getOrb()
          Return the orb
 javax.jbi.messaging.MessageExchange.Role getRole()
          This method returns the role of the component.
 ProviderServiceDescriptor getServiceDescriptor()
           
protected  Method getTypeMethod(Class helperClass)
           
protected  Object localizationViaCorbaloc()
          This method is used to retrieve an object using corbaloc url.
protected  Object localizationViaCorbaname()
           
protected  Object localizationViaIOR()
          Localize the CORBA servant using the IOR.
protected  Object localizationViaNameService()
          This method retrieves the corba object reference using the 'NameService'.
 void locateCorbaService()
           
protected  String readIorFromFile(String filename)
           
 void registerService()
          Gets the service data from the WSDL and creates the CXF service.
 void setIorCorbaObject(String iorCorbaObject)
          set the Ior for reference corba Object generate by statefull interface
 void setServiceDescriptor(ProviderServiceDescriptor serviceDescriptor)
           
 void unregisterService()
          Unregisters the service.
 void validate()
          Validate the endpoint.
 
Methods inherited from class it.imolinfo.jbi4corba.jbi.endpoint.Jbi4CorbaEndpoint
equals, getDefinition, getEndpointName, getEndpointStatus, getEndpointWSDL, getExchangeProcessor, getServiceDescription, getServiceEndpoint, getServiceName, getState, getSuManager, getSuName, getUniqueName, getUniqueName, hashCode, setDefinition, setEndpointStatus, setEndpointWSDL, setExchangeProcessor, setServiceDescription, setServiceEndpoint, setState, setSuManager, setSuName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProviderEndpoint

public ProviderEndpoint(QName serviceName,
                        String endpointName,
                        ProviderServiceDescriptor serviceDescriptor)
                 throws Jbi4CorbaException
Instantiates a new jbi4 ejb provider endpoint.

Parameters:
serviceName - the service name
endpointName - the endpoint name
Throws:
Jbi4EjbException - if some problem occurs
Jbi4CorbaException
Method Detail

getCXFService

public org.apache.cxf.service.Service getCXFService()
Returns:
Returns the CXF Service.

getCXFEndpoint

public org.apache.cxf.endpoint.Endpoint getCXFEndpoint()
Returns:
Returns the CXF Service.

getIorCorbaObject

public String getIorCorbaObject()
Return the Ior for the corba object


setIorCorbaObject

public void setIorCorbaObject(String iorCorbaObject)
set the Ior for reference corba Object generate by statefull interface


getRole

public javax.jbi.messaging.MessageExchange.Role getRole()
This method returns the role of the component.

Specified by:
getRole in class Jbi4CorbaEndpoint
Returns:
The role of the component.
See Also:
@org.apache.xbean.XBean hide="true"

activate

public void activate()
              throws Jbi4CorbaException
Description copied from class: Jbi4CorbaEndpoint
Activate the endpoint.

Specified by:
activate in class Jbi4CorbaEndpoint
Throws:
Exception - The exception
Jbi4CorbaException

deactivate

public void deactivate()
                throws Jbi4CorbaException
Deactivate the endpoint.

Specified by:
deactivate in class Jbi4CorbaEndpoint
Throws:
Exception - The exception
Jbi4CorbaException

registerService

public void registerService()
                     throws Jbi4CorbaDeployException
Gets the service data from the WSDL and creates the CXF service.

Specified by:
registerService in class Jbi4CorbaEndpoint
Throws:
DeploymentException - The deployment exception
Jbi4CorbaDeployException

generateWsdl

protected Document generateWsdl(org.apache.cxf.service.Service cxfService)
                         throws Jbi4CorbaDeployException
Parameters:
serviceCreator - The service creator
sd - The provider service descriptor
interfaceName - The interface name
Returns:
The WSDL generated
Throws:
DeploymentException - The deployment exception
Jbi4CorbaDeployException

getServiceDescriptor

public ProviderServiceDescriptor getServiceDescriptor()
Returns:
Returns the serviceDescriptor

setServiceDescriptor

public void setServiceDescriptor(ProviderServiceDescriptor serviceDescriptor)
Parameters:
serviceDescriptor - The serviceDescriptor to set.

locateCorbaService

public void locateCorbaService()
                        throws Jbi4CorbaException
Throws:
Jbi4CorbaException - The Jbi4Corba exception

getCorbaObjectReference

protected Object getCorbaObjectReference(Class helperClass,
                                         Method narrowMethod,
                                         Object retrievedObject)
                                  throws Jbi4CorbaException
This method is used to obtain a reference to the corba object.

Parameters:
helperClass - The class that provides the method 'narrow'.
narrowMethod - The method to invoke.
retrievedObject - The object used as paramameter for the narrow.
Returns:
The corba object reference.
Throws:
Jbi4CorbaException - The Jbi4Corba exception

ejbLocalization

protected Object ejbLocalization(Class helperClass,
                                 Method extractMethod,
                                 Method narrowMethod,
                                 Method typeMethod)
                          throws Jbi4CorbaException
Parameters:
helperClass - The helper class
extractMethod - The extract method
narrowMethod - The narrow method
typeMethod - The type method
Returns:
The return
Throws:
Jbi4CorbaException - The Jbi4Corba exception

localizationViaCorbaloc

protected Object localizationViaCorbaloc()
                                  throws Jbi4CorbaException
This method is used to retrieve an object using corbaloc url. The corbaloc URL is defined using the corbaServiceName property of the service descriptor. [...] Bootstrap Options for the ORB The ORB can be configured to return the handle of a customized CORBA service from resolve_initial_references() using either ORBInitRef and/or ORBDefaultInitRef. For example, Use -ORBInitRef to resolve to specific CORBA services, for example, -ORBInitRef TraderService=corbaloc::myBank.com:2050/TraderService If no -ORBInitRef is given, -ORBDefaultInitRef is used to resolve. In the TraderService example, -ORBDefaultInitRef corbaloc:iiop:1.2:myBank.com:2050 The order of resolution when these options are used is as follows: 1. Objects registered with register_initial_references 2. -ORBInitRef 3. -ORBDefaultInitRef

Returns:
The object used to retrieve the corba reference.
Throws:
Jbi4CorbaException - When the properties ORBInitRef and ORBDefaultInitRef are both null or empty.
See Also:
http://java.sun.com/j2se/1.5.0/docs/guide/idl/INStutorial.html, ProviderServiceDescriptor

localizationViaCorbaname

protected Object localizationViaCorbaname()
                                   throws Jbi4CorbaException
Returns:
The retrieved object
Throws:
Jbi4CorbaException - The Jbi4Corba exception

getCorbaObjectReference

public Object getCorbaObjectReference(String ior)
                               throws Jbi4CorbaException
This Method return narrowed Corba Object starting from the IOR

Parameters:
String - ior
Returns:
The return
Throws:
Jbi4CorbaException - The Jbi4Corba exception

localizationViaIOR

protected Object localizationViaIOR()
                             throws Jbi4CorbaException
Localize the CORBA servant using the IOR.

Returns:
The return
Throws:
Jbi4CorbaException - The Jbi4Corba exception

readIorFromFile

protected String readIorFromFile(String filename)
                          throws Jbi4CorbaException
Parameters:
filename - The file name
Returns:
The return
Throws:
Jbi4CorbaException - The Jbi4Corba Exception

localizationViaNameService

protected Object localizationViaNameService()
                                     throws Jbi4CorbaException
This method retrieves the corba object reference using the 'NameService'.

Returns:
The retrieved Object.
Throws:
Jbi4CorbaException - The Jbi4Corba exception

getNarrowMethod

protected Method getNarrowMethod(Class helperClass)
                          throws Jbi4CorbaException
Gets the object that represent the method 'narrow' of the helper class.

Parameters:
helperClass - The helper class.
Returns:
The narrow method
Throws:
Jbi4CorbaException - The Jbi4Corba Exception

getExtractMethod

protected Method getExtractMethod(Class helperClass)
                           throws Jbi4CorbaException
Parameters:
helperClass - The helper class
Returns:
The return
Throws:
Jbi4CorbaException - The Jbi4Corba exception

getTypeMethod

protected Method getTypeMethod(Class helperClass)
                        throws Jbi4CorbaException
Parameters:
helperClass - The helper class
Returns:
The return
Throws:
Jbi4CorbaException - The Jbi4Corba exception

unregisterService

public void unregisterService()
                       throws Jbi4CorbaException
Unregisters the service.

Specified by:
unregisterService in class Jbi4CorbaEndpoint
Throws:
Jbi4EjbException - if some problem occurs
Jbi4CorbaException - if something go wrong
See Also:
it.imolinfo.jbi4ejb.jbi.endpoint.Jbi4EjbEndpoint#unregisterService()

validate

public void validate()
              throws Jbi4CorbaException
Validate the endpoint. (now do noting)

Specified by:
validate in class Jbi4CorbaEndpoint
Throws:
Jbi4EjbException - if some problem occurs
Jbi4CorbaException - if something go wrong

getOrb

public ORB getOrb()
Return the orb



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