Java Doc for ComponentContext.java in  » ESB » open-esb » com » sun » jbi » framework » 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 » com.sun.jbi.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.jbi.framework.ComponentContext

ComponentContext
public class ComponentContext implements com.sun.jbi.component.ComponentContext,javax.jbi.management.MBeanNames(Code)
Contains global JBI information for a component to use during its processing. During installation/uninstallation processing, the component can access this context through the InstallationContext. Only the following methods can be called during this time:
  • getMBeanNames()
  • getMBeanServer()
  • getNamingContext()
  • getTransactionManager()
During all other processing, the component can call any of the methods at any time.
author:
   Sun Microsystems, Inc.


Field Summary
final public static  StringLOGGER_NAME_PREFIX
     Prefix for logger names for components.

Constructor Summary
public  ComponentContext(Component component, EnvironmentContext jbiContext)
     Constructor.

Method Summary
public  ServiceEndpointactivateEndpoint(javax.xml.namespace.QName serviceName, String endpointName)
     Activates the named endpoint with the NMR.
public  ObjectNamecreateCustomComponentMBeanName(String customName)
     Formulate and return the MBean ObjectName of a custom control MBean for a JBI component.
Parameters:
  customName - the name of the custom control.
public  voiddeactivateEndpoint(ServiceEndpoint endpoint)
     Deactivates the specified endpoint with the NMR.
public  voidderegisterExternalEndpoint(ServiceEndpoint externalEndpoint)
     Deregisters the specified external endpoint with the NMR.
public  StringgetComponentName()
     Get the unique component name for the component for which this context was created.
public  DeliveryChannelgetDeliveryChannel()
     Get the DeliveryChannel for the component to use to communicate with the Normalized Message Router.
 DeliveryChannelgetDeliveryChannel(boolean activateNewChannel)
     Get the DeliveryChannel for the component to use to communicate with the Normalized Message Router.
public  ServiceEndpointgetEndpoint(javax.xml.namespace.QName service, String name)
     Get the service description for the named endpoint, if any exists.
Parameters:
  service - the qualified name of the endpoint's service.
Parameters:
  name - the name of the endpoint.
public  org.w3c.dom.DocumentgetEndpointDescriptor(ServiceEndpoint endpoint)
     Retrieve metadata for the specified endpoint.
Parameters:
  endpoint - reference to the endpoint.
public  ServiceEndpoint[]getEndpoints(javax.xml.namespace.QName interfaceName)
     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).
public  ServiceEndpoint[]getEndpointsForService(javax.xml.namespace.QName serviceName)
     Queries the NMR for registered endpoints that implement the specified interface.
public  ServiceEndpoint[]getExternalEndpoints(javax.xml.namespace.QName interfaceName)
     Queries the NMR for external endpoints that implement the specified interface name.
Parameters:
  interfaceName - the qualified name of the interface/portType thatis implemented by the endpoints.
public  ServiceEndpoint[]getExternalEndpointsForService(javax.xml.namespace.QName serviceName)
     Queries the NMR for external endpoints that are part of the specified service.
Parameters:
  serviceName - the qualified name of the service that contains theendpoints.
public  StringgetInstallRoot()
     Get the installation root directory for this component.
public  StringgetJmxDomainName()
     Retrieve the default JMX Domain Name for MBeans registered in this instance of the JBI implementation.
public  KeyStoreUtilgetKeyStoreUtil()
    
public  LoggergetLogger(String suffix, String resourceBundleName)
     Get a logger instance from JBI.
public  javax.jbi.management.MBeanNamesgetMBeanNames()
     Get the JMX MBean naming service handle.
public  MBeanServergetMBeanServer()
     Get the JMX MBean server with which all MBeans are registered.
public  ManagementMessageFactorygetManagementMessageFactory()
     Get the management message factory which enables JBI components to construct status and exception messages.
public  InitialContextgetNamingContext()
     Get the JNDI naming context currently in effect.
public  StringTranslatorgetStringTranslator(String packageName)
     Get a StringTranslator for use in constructing messages using resource bundles. This method delegates to the JBI EnvironmentContext method.
Parameters:
  packageName - the name of the package that contains theresource bundle to be used by the StringTranslator.
public  StringTranslatorgetStringTranslatorFor(Object object)
     Get a StringTranslator for use in constructing messages using resource bundles. This method delegates to the JBI EnvironmentContext method.
Parameters:
  object - an object that is in the same package as theresource bundle to be used by the StringTranslator.
public  ObjectgetTransactionManager()
     Get the TransactionManager for the current implementation.
public  StringgetWorkspaceRoot()
     Get the workspace root directory for this component.
public  WsdlFactorygetWsdlFactory()
     Get a copy of the WSDL factory.
public  voidregisterExternalEndpoint(ServiceEndpoint externalEndpoint)
     Registers the specified external endpoint with the NMR.
public  voidregisterXAResource(XAResource resource)
     Used by a component to register an internal XAResource with the JBI runtime.
public  ServiceEndpointresolveEndpointReference(org.w3c.dom.DocumentFragment endpointReference)
     Resolves the specified endpoint reference into a service endpoint.

Field Detail
LOGGER_NAME_PREFIX
final public static String LOGGER_NAME_PREFIX(Code)
Prefix for logger names for components. This is public so that the junit tests have access to it.




Constructor Detail
ComponentContext
public ComponentContext(Component component, EnvironmentContext jbiContext)(Code)
Constructor.
Parameters:
  component - the Component instance representing the component forwhich this context is being created.
Parameters:
  jbiContext - the JBI EnvironmentContext instance.




Method Detail
activateEndpoint
public ServiceEndpoint activateEndpoint(javax.xml.namespace.QName serviceName, String endpointName) throws javax.jbi.JBIException(Code)
Activates the named endpoint with the NMR. This makes the endpoint available to the NMR so it can send requests to the endpoint.
Parameters:
  serviceName - the qualified name of the service exposed by theendpoint.
Parameters:
  endpointName - the name of the endpoint to be activated. a reference to the activated endpoint.
throws:
  javax.jbi.JBIException - if the endpoint cannot be activated.



createCustomComponentMBeanName
public ObjectName createCustomComponentMBeanName(String customName)(Code)
Formulate and return the MBean ObjectName of a custom control MBean for a JBI component.
Parameters:
  customName - the name of the custom control. the JMX ObjectName of the MBean, or null if customName is invalid.



deactivateEndpoint
public void deactivateEndpoint(ServiceEndpoint endpoint) throws javax.jbi.JBIException(Code)
Deactivates the specified 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.
throws:
  javax.jbi.JBIException - if the endpoint cannot be deactivated.



deregisterExternalEndpoint
public void deregisterExternalEndpoint(ServiceEndpoint externalEndpoint) throws javax.jbi.JBIException(Code)
Deregisters the specified external endpoint with the NMR. This indicates to the NMR that external service consumers can no longer access the internal service by this name.
Parameters:
  externalEndpoint - the external endpoint to be deregistered.
throws:
  javax.jbi.JBIException - if the endpoint cannot be deregistered.



getComponentName
public String getComponentName()(Code)
Get the unique component name for the component for which this context was created. the component's unique name.



getDeliveryChannel
public DeliveryChannel getDeliveryChannel() throws javax.jbi.messaging.MessagingException(Code)
Get the DeliveryChannel for the component to use to communicate with the Normalized Message Router. If the component has not yet been initialized, a DeliveryChannel cannot be created.

This method is visible to the component, and calls the internal framework-only method to obtain the channel. the delivery channel.
throws:
  javax.jbi.messaging.MessagingException - if the channel cannotbe activated.




getDeliveryChannel
DeliveryChannel getDeliveryChannel(boolean activateNewChannel) throws javax.jbi.messaging.MessagingException(Code)
Get the DeliveryChannel for the component to use to communicate with the Normalized Message Router. If it has not yet been activated, activate it and save it. If it has been closed, replace it with a new one.

This method is visible only to the framework.
Parameters:
  activateNewChannel - Set to true to allow activation of a newchannel if one is not already active; set to false to prevent activationof a new channel. the delivery channel or null if there is none.
throws:
  javax.jbi.messaging.MessagingException - if the channel cannot beactivated.




getEndpoint
public ServiceEndpoint getEndpoint(javax.xml.namespace.QName service, String name)(Code)
Get the service description for the named endpoint, if any exists.
Parameters:
  service - the qualified name of the endpoint's service.
Parameters:
  name - the name of the endpoint. the named endpoint, or null if the named endpointis not active.



getEndpointDescriptor
public org.w3c.dom.Document getEndpointDescriptor(ServiceEndpoint endpoint) throws javax.jbi.JBIException(Code)
Retrieve metadata for the specified endpoint.
Parameters:
  endpoint - reference to the endpoint. the metadata describing the endpoint or null ifmetadata is unavailable.
throws:
  javax.jbi.JBIException - if the endpoint reference is invalid.



getEndpoints
public ServiceEndpoint[] getEndpoints(javax.xml.namespace.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 registerExternalEndpoint(ServiceEndpoint)).
Parameters:
  interfaceName - qualified name of interface/portType that is implemented by the endpoint ServiceEndpoint[] list of available endpoints for the specified interface name; potentially zero-length.



getEndpointsForService
public ServiceEndpoint[] getEndpointsForService(javax.xml.namespace.QName serviceName)(Code)
Queries the NMR for registered endpoints that implement the specified interface. This will return the endpoints for all services and endpoints that implement the named interface.
Parameters:
  serviceName - the qualified name of the interface/portType thatis implemented by the endpoint. array of available endpoints for the specified interface name;can be empty if none exist.



getExternalEndpoints
public ServiceEndpoint[] getExternalEndpoints(javax.xml.namespace.QName interfaceName)(Code)
Queries the NMR for external endpoints that implement the specified interface name.
Parameters:
  interfaceName - the qualified name of the interface/portType thatis implemented by the endpoints. array of available external endpoints for the specified interfacename; can be empty if none exist.



getExternalEndpointsForService
public ServiceEndpoint[] getExternalEndpointsForService(javax.xml.namespace.QName serviceName)(Code)
Queries the NMR for external endpoints that are part of the specified service.
Parameters:
  serviceName - the qualified name of the service that contains theendpoints. array of available external endpoints for the specified servicename; can be empty if none exist.



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



getJmxDomainName
public String getJmxDomainName()(Code)
Retrieve the default JMX Domain Name for MBeans registered in this instance of the JBI implementation. the JMX domain name for this instance of the JBI implementation.



getKeyStoreUtil
public KeyStoreUtil getKeyStoreUtil()(Code)
Returns a KeyStoreUtil object that allows components to create, read, update, and delete keys An instance of a KeyStoreUtil



getLogger
public Logger getLogger(String suffix, String resourceBundleName) throws java.util.MissingResourceException, javax.jbi.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. In addition to creating the logger instance, this implementation also adds the logger instance to a list used by the ComponentLoggerMBean to display and control of the logger level via the administrative tools. In this implementation, the main logger always has its logger name set to the component name, and all sub-loggers are prefixed with the component name. This provides the ability to set the log levels for all of a component's loggers by setting the main logger's level. However, it is important to note that if the log level is explicitly set for a sub-logger, that level stays in effect regardless of the main logger's level, until the sub-logger's level is explicitly changed. If a component does not call this method to create a main logger before calling it to create a sub-logger, the main logger is created automatically before the sub-logger is created.
Parameters:
  suffix - logger name suffix for creating subloggers; empty stringfor base logger.
Parameters:
  resourceBundleName - name of ResourceBundle to be usedfor localizing messages for the logger. May be null if noneof the messages require localization. The resource, if non-null, must beloadable using the component's class loader as the initiating loader. a standard logger, named uniquely for this component (plus thegiven suffix, if applicable)
throws:
  java.util.MissingResourceException - if the resourceBundleName isnon-null and no corresponding resource can be found.
throws:
  javax.jbi.JBIException - if any other error occurs.



getMBeanNames
public javax.jbi.management.MBeanNames getMBeanNames()(Code)
Get the JMX MBean naming service handle. This method returns this instance, as it has the methods defined by the public API. These methods in turn use the IPI implementation to perform the operations. the JMX MBean naming service handle.



getMBeanServer
public MBeanServer getMBeanServer()(Code)
Get the JMX MBean server with which all MBeans are registered. This method delegates to the JBI EnvironmentContext method. the main JMX MBean server.



getManagementMessageFactory
public ManagementMessageFactory getManagementMessageFactory()(Code)
Get the management message factory which enables JBI components to construct status and exception messages. This method delegates to the JBI EnvironmentContext method. the management message factory handle.



getNamingContext
public InitialContext getNamingContext()(Code)
Get the JNDI naming context currently in effect. This method delegates to the JBI EnvironmentContext method. the JNDI naming context.



getStringTranslator
public StringTranslator getStringTranslator(String packageName)(Code)
Get a StringTranslator for use in constructing messages using resource bundles. This method delegates to the JBI EnvironmentContext method.
Parameters:
  packageName - the name of the package that contains theresource bundle to be used by the StringTranslator. the StringTranslator for the specified package name.



getStringTranslatorFor
public StringTranslator getStringTranslatorFor(Object object)(Code)
Get a StringTranslator for use in constructing messages using resource bundles. This method delegates to the JBI EnvironmentContext method.
Parameters:
  object - an object that is in the same package as theresource bundle to be used by the StringTranslator. the StringTranslator for the specified package.



getTransactionManager
public Object getTransactionManager()(Code)
Get the TransactionManager for the current implementation. This method delegates to the JBI EnvironmentContext method. the TransactionManager instance.



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



getWsdlFactory
public WsdlFactory getWsdlFactory() throws WsdlException(Code)
Get a copy of the WSDL factory. This needs to be done before any reading, writing, or manipulation of WSDL documents can be performed using the WSDL API. An instance of the WSDL factory.
exception:
  WsdlException - If the factory cannot be instantiated.



registerExternalEndpoint
public void registerExternalEndpoint(ServiceEndpoint externalEndpoint) throws javax.jbi.JBIException(Code)
Registers the specified external endpoint with the NMR. This indicates to the NMR that the specified endpoint is used as a proxy for external service consumers to access an internal service by the same name.
Parameters:
  externalEndpoint - the external endpoint to be registered.
throws:
  javax.jbi.JBIException - if the endpoint is already registered.



registerXAResource
public void registerXAResource(XAResource resource) throws JBIException(Code)
Used by a component to register an internal XAResource with the JBI runtime.
Parameters:
  resource - to be registered
exception:
  JBIException - if something is wrong with the XAResource.



resolveEndpointReference
public ServiceEndpoint resolveEndpointReference(org.w3c.dom.DocumentFragment endpointReference)(Code)
Resolves the specified endpoint reference into a service endpoint. This is called by the component when it has an endpoint reference that it needs to resolve into a service endpoint.
Parameters:
  endpointReference - the endpoint reference as an XML fragment. the service endpoint corresponding to the specified endpointreference, or null if the reference cannot be resolved.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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