org.ow2.petals.jbi.component.context
Class ComponentContextImpl

java.lang.Object
  extended by org.ow2.petals.jbi.component.context.ComponentContextImpl
All Implemented Interfaces:
javax.jbi.component.ComponentContext

public class ComponentContextImpl
extends java.lang.Object
implements ComponentContext

Since:
Petals 1.0
Version:
$Revision: 27788 $ $Date: 2006-08-04 12:11:16 +0200 (ven., 04 août 2006) $
Author:
Rafael Marins, wjoseph - eBMWebsourcing

Field Summary
protected  ComponentContextCommunication componentContextCommunication
          The component context communication (can be either an installer or a component life cycle)
protected  DeliveryChannel deliveryChannel
           
protected  java.util.Set<javax.jbi.servicedesc.ServiceEndpoint> externalEndpoints
          references of registered external serviceEndpoints
protected  java.util.Set<javax.jbi.servicedesc.ServiceEndpoint> internalEndpoints
          references of registered internal serviceEndpoints
protected  javax.jbi.component.Component jbiComponent
           
protected  org.ow2.petals.util.LoggingUtil logger
           
 
Constructor Summary
ComponentContextImpl(ComponentContextCommunication componentContextCommunication)
          Constructor of the ComponentContextImpl class
 
Method Summary
 javax.jbi.servicedesc.ServiceEndpoint activateEndpoint(javax.xml.namespace.QName serviceName, java.lang.String endpointName)
           
 void clear()
          Clear the component Context, remove objects dependent to the component life cycle scope.
 void deactivateEndpoint(javax.jbi.servicedesc.ServiceEndpoint endpoint)
           
 void deregisterAllEndpoints()
          deregister all endpoints (internal and external)
 void deregisterExternalEndpoint(javax.jbi.servicedesc.ServiceEndpoint externalEndpoint)
           
 ServiceEndpoint getAddress()
           
 javax.jbi.component.Component getComponent()
           
 java.lang.String getComponentName()
           
 DeliveryChannel getDeliveryChannel()
           
 DeliveryChannel getDeliveryChannelImpl()
          Return the actual deliveryChannel.
 javax.jbi.servicedesc.ServiceEndpoint getEndpoint(javax.xml.namespace.QName service, java.lang.String name)
           
 org.w3c.dom.Document getEndpointDescriptor(javax.jbi.servicedesc.ServiceEndpoint endpoint)
           
 javax.jbi.servicedesc.ServiceEndpoint[] getEndpoints(javax.xml.namespace.QName interfaceName)
           
 javax.jbi.servicedesc.ServiceEndpoint[] getEndpointsForService(javax.xml.namespace.QName serviceName)
           
 javax.jbi.servicedesc.ServiceEndpoint[] getExternalEndpoints(javax.xml.namespace.QName interfaceName)
           
 javax.jbi.servicedesc.ServiceEndpoint[] getExternalEndpointsForService(javax.xml.namespace.QName serviceName)
           
 java.lang.String getInstallRoot()
           
 org.ow2.petals.jbi.descriptor.original.generated.Jbi getJbi()
           
 java.util.logging.Logger getLogger()
           
 java.util.logging.Logger getLogger(java.lang.String suffix, java.lang.String resourceBundleName)
           
 javax.jbi.management.MBeanNames getMBeanNames()
           
 javax.management.MBeanServer getMBeanServer()
           
 javax.naming.InitialContext getNamingContext()
           
 RouterService getRouter()
           
 SecurityContext getSecurityContext()
           
 java.lang.Object getTransactionManager()
           
 java.lang.String getWorkspaceRoot()
           
 void registerExternalEndpoint(javax.jbi.servicedesc.ServiceEndpoint externalEndpoint)
           
 javax.jbi.servicedesc.ServiceEndpoint resolveEndpointReference(org.w3c.dom.DocumentFragment epr)
           
 void setComponent(javax.jbi.component.Component component)
           
 void setDeliveryChannel(DeliveryChannel deliveryChannel)
           
 void setSecurityContext(SecurityContext securityContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deliveryChannel

protected DeliveryChannel deliveryChannel

externalEndpoints

protected java.util.Set<javax.jbi.servicedesc.ServiceEndpoint> externalEndpoints
references of registered external serviceEndpoints


internalEndpoints

protected java.util.Set<javax.jbi.servicedesc.ServiceEndpoint> internalEndpoints
references of registered internal serviceEndpoints


jbiComponent

protected javax.jbi.component.Component jbiComponent

componentContextCommunication

protected final ComponentContextCommunication componentContextCommunication
The component context communication (can be either an installer or a component life cycle)


logger

protected org.ow2.petals.util.LoggingUtil logger
Constructor Detail

ComponentContextImpl

public ComponentContextImpl(ComponentContextCommunication componentContextCommunication)
Constructor of the ComponentContextImpl class

Parameters:
fractalComponent - the fractal representation of installer
Throws:
java.lang.IllegalArgumentException - Fractal Error: Impossible to get the service interface
Method Detail

activateEndpoint

public javax.jbi.servicedesc.ServiceEndpoint activateEndpoint(javax.xml.namespace.QName serviceName,
                                                              java.lang.String endpointName)
                                                       throws javax.jbi.JBIException
Specified by:
activateEndpoint in interface javax.jbi.component.ComponentContext
Throws:
javax.jbi.JBIException

clear

public void clear()
Clear the component Context, remove objects dependent to the component life cycle scope. To be used when to component is uninstalling.


deactivateEndpoint

public void deactivateEndpoint(javax.jbi.servicedesc.ServiceEndpoint endpoint)
                        throws javax.jbi.JBIException
Specified by:
deactivateEndpoint in interface javax.jbi.component.ComponentContext
Throws:
javax.jbi.JBIException

deregisterAllEndpoints

public void deregisterAllEndpoints()
                            throws javax.jbi.JBIException
deregister all endpoints (internal and external)

Throws:
javax.jbi.JBIException

deregisterExternalEndpoint

public void deregisterExternalEndpoint(javax.jbi.servicedesc.ServiceEndpoint externalEndpoint)
                                throws javax.jbi.JBIException
Specified by:
deregisterExternalEndpoint in interface javax.jbi.component.ComponentContext
Throws:
javax.jbi.JBIException

getAddress

public ServiceEndpoint getAddress()

getComponent

public javax.jbi.component.Component getComponent()

getComponentName

public java.lang.String getComponentName()
Specified by:
getComponentName in interface javax.jbi.component.ComponentContext

getDeliveryChannel

public DeliveryChannel getDeliveryChannel()
                                   throws javax.jbi.messaging.MessagingException
Specified by:
getDeliveryChannel in interface javax.jbi.component.ComponentContext
Throws:
javax.jbi.messaging.MessagingException

getDeliveryChannelImpl

public DeliveryChannel getDeliveryChannelImpl()
Return the actual deliveryChannel. Can be null.

Returns:

getEndpoint

public javax.jbi.servicedesc.ServiceEndpoint getEndpoint(javax.xml.namespace.QName service,
                                                         java.lang.String name)
Specified by:
getEndpoint in interface javax.jbi.component.ComponentContext

getEndpointDescriptor

public org.w3c.dom.Document getEndpointDescriptor(javax.jbi.servicedesc.ServiceEndpoint endpoint)
                                           throws javax.jbi.JBIException
Specified by:
getEndpointDescriptor in interface javax.jbi.component.ComponentContext
Throws:
javax.jbi.JBIException

getEndpoints

public javax.jbi.servicedesc.ServiceEndpoint[] getEndpoints(javax.xml.namespace.QName interfaceName)
Specified by:
getEndpoints in interface javax.jbi.component.ComponentContext

getEndpointsForService

public javax.jbi.servicedesc.ServiceEndpoint[] getEndpointsForService(javax.xml.namespace.QName serviceName)
Specified by:
getEndpointsForService in interface javax.jbi.component.ComponentContext

getExternalEndpoints

public javax.jbi.servicedesc.ServiceEndpoint[] getExternalEndpoints(javax.xml.namespace.QName interfaceName)
Specified by:
getExternalEndpoints in interface javax.jbi.component.ComponentContext

getExternalEndpointsForService

public javax.jbi.servicedesc.ServiceEndpoint[] getExternalEndpointsForService(javax.xml.namespace.QName serviceName)
Specified by:
getExternalEndpointsForService in interface javax.jbi.component.ComponentContext

getInstallRoot

public java.lang.String getInstallRoot()
Specified by:
getInstallRoot in interface javax.jbi.component.ComponentContext

getJbi

public org.ow2.petals.jbi.descriptor.original.generated.Jbi getJbi()

getLogger

public java.util.logging.Logger getLogger()

getLogger

public java.util.logging.Logger getLogger(java.lang.String suffix,
                                          java.lang.String resourceBundleName)
                                   throws java.util.MissingResourceException,
                                          javax.jbi.JBIException
Specified by:
getLogger in interface javax.jbi.component.ComponentContext
Throws:
java.util.MissingResourceException
javax.jbi.JBIException

getMBeanNames

public javax.jbi.management.MBeanNames getMBeanNames()
Specified by:
getMBeanNames in interface javax.jbi.component.ComponentContext

getMBeanServer

public javax.management.MBeanServer getMBeanServer()
Specified by:
getMBeanServer in interface javax.jbi.component.ComponentContext

getNamingContext

public javax.naming.InitialContext getNamingContext()
Specified by:
getNamingContext in interface javax.jbi.component.ComponentContext

getRouter

public RouterService getRouter()

getSecurityContext

public SecurityContext getSecurityContext()
Returns:
the securityContext

getTransactionManager

public java.lang.Object getTransactionManager()
Specified by:
getTransactionManager in interface javax.jbi.component.ComponentContext

getWorkspaceRoot

public java.lang.String getWorkspaceRoot()
Specified by:
getWorkspaceRoot in interface javax.jbi.component.ComponentContext

registerExternalEndpoint

public void registerExternalEndpoint(javax.jbi.servicedesc.ServiceEndpoint externalEndpoint)
                              throws javax.jbi.JBIException
Specified by:
registerExternalEndpoint in interface javax.jbi.component.ComponentContext
Throws:
javax.jbi.JBIException

resolveEndpointReference

public javax.jbi.servicedesc.ServiceEndpoint resolveEndpointReference(org.w3c.dom.DocumentFragment epr)
Specified by:
resolveEndpointReference in interface javax.jbi.component.ComponentContext

setComponent

public void setComponent(javax.jbi.component.Component component)

setDeliveryChannel

public void setDeliveryChannel(DeliveryChannel deliveryChannel)

setSecurityContext

public void setSecurityContext(SecurityContext securityContext)
Parameters:
securityContext - the securityContext to set


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