Java Doc for ComponentContext.java in  » ESB » open-esb » javax » jbi » component » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » open esb » javax.jbi.component 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.jbi.component.ComponentContext

ComponentContext
public interface ComponentContext (Code)
This interface provides access to data needed by a JBI component about the JBI environment in which it is installed, as well providing the means to allow the component to inform the JBI environment about services provided by this component. This interface provides methods for the following functions:
  • Get the DeliveryChannel for this component. This is required to allow the component to send and receive message exchanges.
  • Activate (and deactivate) service endpoints provided by this component.
  • Register (and deregister) external endpoints provided by this component.
  • Query available endpoints (internal and external).
  • Query various data about the component, as installed in the JBI environment (name, workspace root, install root, initial JNDI context, MBean Server, Transaction Manager).
  • Loggers. Obtain the component's logger and subloggers.
  • MBean name creator. Access a utility for creating custom MBean names.
  • EPR Resolver. Ask JBI to resolve an endpoint reference (EPR), converting it into a service endpoint.
Note: The term "NMR" (meaning Normalized Message Router) is used here to refer to the messaging system of the JBI implementation. This term is used as a synonym for the JBI implementation, and refers only to the logical message routing functions of a JBI implementation. It is not meant to require that JBI implementations literally have a subsystem named "NMR".
author:
   JSR208 Expert Group




Method Summary
 ServiceEndpointactivateEndpoint(QName serviceName, String endpointName)
     Activates the named endpoint with the NMR.
 voiddeactivateEndpoint(ServiceEndpoint endpoint)
     Deactivates the given endpoint with the NMR.
 voidderegisterExternalEndpoint(ServiceEndpoint externalEndpoint)
     Deregisters the given external endpoint with the NMR.
 StringgetComponentName()
     Get the unique component name of this component, ass assigned by the identification section of this component's installation descriptor.
 DeliveryChannelgetDeliveryChannel()
     Get a channel for this component to use to communicate with the Normalized Message Router.
 ServiceEndpointgetEndpoint(QName service, String name)
     Get the service endpoint for the named activated endpoint, if any.
Parameters:
  service - qualified-name of the endpoint's service; must benon-null.
Parameters:
  name - name of the endpoint; must be non-null.
 DocumentgetEndpointDescriptor(ServiceEndpoint endpoint)
     Retrieve the service description metadata for the specified endpoint.

Note that the result can use either the WSDL 1.1 or WSDL 2.0 description language.
Parameters:
  endpoint - endpoint reference; must be non-null.

 ServiceEndpoint[]getEndpoints(QName interfaceName)
     Queries the NMR for active endpoints that implement the given interface.
 ServiceEndpoint[]getEndpointsForService(QName serviceName)
     Queries the NMR for active endpoints belonging to the given service.
 ServiceEndpoint[]getExternalEndpoints(QName interfaceName)
     Queries the NMR for external endpoints that implement the given interface name.
 ServiceEndpoint[]getExternalEndpointsForService(QName serviceName)
     Queries the NMR for external endpoints that are part of the given service.
Parameters:
  serviceName - qualified name of service that contains the endpoints;must be non-null.
 StringgetInstallRoot()
     Get the installation root directory path for this component.
 LoggergetLogger(String suffix, String resourceBundleName)
     Get a logger instance from JBI.
 javax.jbi.management.MBeanNamesgetMBeanNames()
     Get a reference to the MBeanNames creator for use in creating custom MBean names.
 javax.management.MBeanServergetMBeanServer()
     Get the JMX MBean server used to register all MBeans in the JBI environment.
 javax.naming.InitialContextgetNamingContext()
     Get the JNDI naming context for this component.
 ObjectgetTransactionManager()
     Get the TransactionManager for this implementation.
 StringgetWorkspaceRoot()
     Get the root directory path for this component's private workspace.
 voidregisterExternalEndpoint(ServiceEndpoint externalEndpoint)
     Registers the given external endpoint with the NMR.
 ServiceEndpointresolveEndpointReference(DocumentFragment epr)
     Resolve the given endpoint reference into a service endpoint.



Method Detail
activateEndpoint
ServiceEndpoint activateEndpoint(QName serviceName, String endpointName) throws JBIException(Code)
Activates the named endpoint with the NMR. Activation indicates to the NMR that this component is ready to process requests sent to the named endpoint.

Note that the JBI implementation may call this component's Component.getServiceDescription(ServiceEndpoint) method before returning from this method call; the component's implementation must be ready to supply service description metadata before the result of this activation call (a ServiceEndpoint) is known.
Parameters:
  serviceName - qualified name of the service the endpoint exposes;must be non-null.
Parameters:
  endpointName - the name of the endpoint to be activated; must benon-null and non-empty. a reference to the activated endpoint; must be non-null.
exception:
  JBIException - if the endpoint cannot be activated.




deactivateEndpoint
void deactivateEndpoint(ServiceEndpoint endpoint) throws JBIException(Code)
Deactivates the given endpoint with the NMR. Deactivation indicates to the NMR that this component will no longer process requests sent to the named endpoint.
Parameters:
  endpoint - reference to the endpoint to be deactivated; must benon-null.
exception:
  JBIException - if the endpoint cannot be deactivated.



deregisterExternalEndpoint
void deregisterExternalEndpoint(ServiceEndpoint externalEndpoint) throws JBIException(Code)
Deregisters the given external endpoint with the NMR. This indicates to the NMR that the given external endpoint can no longer be used as a proxy for external service consumers to access an internal service of the same service name.
Parameters:
  externalEndpoint - the external endpoint to be deregistered; mustbe non-null.
exception:
  JBIException - if the given external endpoint was not previouslyregistered.



getComponentName
String getComponentName()(Code)
Get the unique component name of this component, ass assigned by the identification section of this component's installation descriptor. the component name; must be non-null and non-empty.



getDeliveryChannel
DeliveryChannel getDeliveryChannel() throws MessagingException(Code)
Get a channel for this component to use to communicate with the Normalized Message Router. This channel must be used by the component to send and receive message exchanges. the delivery channel for this component; must be non-null.
exception:
  MessagingException - if a channel has already been opened,but not yet closed.



getEndpoint
ServiceEndpoint getEndpoint(QName service, String name)(Code)
Get the service endpoint for the named activated endpoint, if any.
Parameters:
  service - qualified-name of the endpoint's service; must benon-null.
Parameters:
  name - name of the endpoint; must be non-null. the named endpoint, or null if the named endpointis not activated.



getEndpointDescriptor
Document getEndpointDescriptor(ServiceEndpoint endpoint) throws JBIException(Code)
Retrieve the service description metadata for the specified endpoint.

Note that the result can use either the WSDL 1.1 or WSDL 2.0 description language.
Parameters:
  endpoint - endpoint reference; must be non-null. metadata describing endpoint, or null if metadatais unavailable.
exception:
  JBIException - invalid endpoint reference.




getEndpoints
ServiceEndpoint[] getEndpoints(QName interfaceName)(Code)
Queries the NMR for active endpoints that implement the given interface. This will return the endpoints for all services and endpoints that implement the named interface (portType in WSDL 1.1). This method does NOT include external endpoints (those registered using ComponentContext.registerExternalEndpoint(ServiceEndpoint) .
Parameters:
  interfaceName - qualified name of interface/portType that isimplemented by the endpoint; if null then allactivated endpoints in the JBI environment must be returned. an array of available endpoints for the specified interface name;must be non-null; may be empty.



getEndpointsForService
ServiceEndpoint[] getEndpointsForService(QName serviceName)(Code)
Queries the NMR for active endpoints belonging to the given service. This method does NOT include external endpoints (those registered using ComponentContext.registerExternalEndpoint(ServiceEndpoint) .
Parameters:
  serviceName - qualified name of the service that the endpointsare part of; must be non-null. an array of available endpoints for the specified service name;must be non-null; may be empty.



getExternalEndpoints
ServiceEndpoint[] getExternalEndpoints(QName interfaceName)(Code)
Queries the NMR for external endpoints that implement the given interface name. This methods returns only registered external endpoints (see ComponentContext.registerExternalEndpoint(ServiceEndpoint) .
Parameters:
  interfaceName - qualified name of interface implemented by theendpoints; must be non-null. an array of available external endpoints for the specifiedinterface name; must be non-null; may be empty.



getExternalEndpointsForService
ServiceEndpoint[] getExternalEndpointsForService(QName serviceName)(Code)
Queries the NMR for external endpoints that are part of the given service.
Parameters:
  serviceName - qualified name of service that contains the endpoints;must be non-null. an array of available external endpoints for the specifiedservice name; must be non-null; may be empty.



getInstallRoot
String getInstallRoot()(Code)
Get the installation root directory path for this component.

This method MUST return the file path formatted for the underlying platform. the installation root directory path, in platform-specificform; must be non-null and non-empty.




getLogger
Logger getLogger(String suffix, String resourceBundleName) throws MissingResourceException, JBIException(Code)
Get a logger instance from JBI. Loggers supplied by JBI are guaranteed to have unique names such that they avoid name collisions with loggers from other components created using this method. The suffix parameter allows for the creation of subloggers as needed. The JBI specification says nothing about the exact names to be used, only that they must be unique across components and the JBI implementation itself.
Parameters:
  suffix - for creating subloggers; use an empty string for the basecomponent logger; must be non-null.
Parameters:
  resourceBundleName - name of ResourceBundle to be usedfor localizing messages for the logger. May be nullif none of the messages require localization. The resource, ifnon-null, must be loadable using the component's class loaderas the initiating loader. a standard logger, named uniquely for this component (plus thegiven suffix, if applicable); must be non-null.
exception:
  MissingResourceException - if the ResourceBundleName is non-nulland no corresponding resource can be found.
exception:
  JBIException - if the resourceBundleName has changed froma previous invocation by this component of this method withthe same suffix.



getMBeanNames
javax.jbi.management.MBeanNames getMBeanNames()(Code)
Get a reference to the MBeanNames creator for use in creating custom MBean names. reference to the MBeanNames creator; must be non-null.



getMBeanServer
javax.management.MBeanServer getMBeanServer()(Code)
Get the JMX MBean server used to register all MBeans in the JBI environment. a reference to the MBean server; must be non-null.



getNamingContext
javax.naming.InitialContext getNamingContext()(Code)
Get the JNDI naming context for this component. This context is a standard JNDI InitialContext but its content will vary based on the environment in which the JBI implementation is running. the JNDI naming context; must be non-null.



getTransactionManager
Object getTransactionManager()(Code)
Get the TransactionManager for this implementation. The instance returned is an implementation of the standard JTA interface. If none is available, this method returns null.

The object returned by this method is untyped, to allow this interface to be compiled in environments that do not support JTA. If not null, the object returned must be of type javax.transaction.TransactionManager.

This downcast is necessary because JBI is used in environments that do not support JTA (i.e., J2SE). Explicit use of JTA types would cause compilation failures in such environments. A TransactionManager instance, or null if noneis available in the execution environment.




getWorkspaceRoot
String getWorkspaceRoot()(Code)
Get the root directory path for this component's private workspace.

This method MUST return the file path formatted for the underlying platform.

The returned value must indicate a valid file path that the component may use to write files to, and read files from. the private workspace root path, in platform-specific form;must be non-null and non-empty.




registerExternalEndpoint
void registerExternalEndpoint(ServiceEndpoint externalEndpoint) throws JBIException(Code)
Registers the given external endpoint with the NMR. This indicates to the NMR that the given endpoint is used as a proxy for external service consumers to access an internal service of the same service name (but a different endpoint name).
Parameters:
  externalEndpoint - the external endpoint to be registered, must benon-null.
exception:
  JBIException - if an external endpoint with the same name isalready registered, by this or another component.



resolveEndpointReference
ServiceEndpoint resolveEndpointReference(DocumentFragment epr)(Code)
Resolve the given endpoint reference into a service endpoint. This is called by the component when it has an EPR that it wants to resolve into a service endpoint.

Note that the service endpoint returned refers to a dynamic endpoint; the endpoint will exist only as long as this component retains a strong reference to the object returned by this method. The endpoint may not be included in the list of "activated" endpoints.
Parameters:
  epr - endpoint reference as an XML fragment; must be non-null. the service endpoint corresponding to the given endpointreference; null if the reference cannot be resolved.




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.