001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)EnvironmentContext.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi;
030:
031: /**
032: * This context contains data needed by all components and services running in
033: * the JBI environment. This interface defines only methods that are not part
034: * of the JBI specification.
035: *
036: * @author Sun Microsystems, Inc.
037: */
038: public interface EnvironmentContext {
039: /**
040: * Get the AppServer installation root directory.
041: * @return The AppServer install root.
042: */
043: String getAppServerInstallRoot();
044:
045: /**
046: * Get the AppServer instance root directory.
047: * @return The AppServer instance root.
048: */
049: String getAppServerInstanceRoot();
050:
051: /**
052: * Get the ComponentManager handle.
053: * @return The ComponentManager instance.
054: */
055: ComponentManager getComponentManager();
056:
057: /**
058: * Get the ComponentQuery handle.
059: * @return The ComponentQuery instance.
060: */
061: ComponentQuery getComponentQuery();
062:
063: /**
064: * Get the ComponentQuery for a specified target.
065: * @param targetName - either "domain" or a valid server / cluster name
066: * @return The ComponentQuery instance.
067: */
068: ComponentQuery getComponentQuery(String targetName);
069:
070: /**
071: * Get the Event Notifier for emitting event notifications.
072: * @return The EventNotifier instance.
073: */
074: com.sun.jbi.framework.EventNotifierCommon getNotifier();
075:
076: /**
077: * Get a reference to the persisted JBI registry.
078: * @return Registry instance
079: */
080: com.sun.jbi.registry.Registry getRegistry();
081:
082: /**
083: * Get a read-only reference to the persisted JBI Registry. A DOM registry document
084: * object is returned.
085: * @return the registry document
086: */
087: org.w3c.dom.Document getReadOnlyRegistry();
088:
089: /**
090: * Indicates whether or not the JBI framework has been fully started. This
091: * method provides clients with a way of determining if the JBI framework
092: * started up in passive mode as a result of on-demand initialization.
093: * The 'start' parameter instructs the framework to
094: * start completely if it has not already done so. If the framework has
095: * already been started, the request to start again is ignored.
096: * @param start requests that the framework start completely before
097: * returning.
098: * @return true if the framework is completely started, false otherwise.
099: */
100: public boolean isFrameworkReady(boolean start);
101:
102: /**
103: * Get the ConnectionManager handle.
104: * @return The ConnectionManager instance.
105: */
106: com.sun.jbi.messaging.ConnectionManager getConnectionManager();
107:
108: /**
109: * Gets the initial properties specified in the domain.xml file.
110: * @return The initial properties from the AppServer.
111: */
112: java.util.Properties getInitialProperties();
113:
114: /**
115: * Get the JBI install root directory path.
116: * @return The JBI install root directory path.
117: */
118: String getJbiInstallRoot();
119:
120: /**
121: * Get the JBI instance root directory path.
122: * @return The JBI instance root directory path.
123: */
124: String getJbiInstanceRoot();
125:
126: /**
127: * Get a handle to the class implementing management for the named
128: * JBI system service.
129: * @param aServiceName - the name of the JBI system service.
130: * @return The instance implementing management for the service.
131: */
132: Object getManagementClass(String aServiceName);
133:
134: /**
135: * Get the management message factory which enables JBI components
136: * to construct status and exception messages.
137: * @return An instance of ManagementMessageFactory.
138: */
139: com.sun.jbi.management.ManagementMessageFactory getManagementMessageFactory();
140:
141: /**
142: * Get a handle to the MBeanHelper implementation.
143: * @return The MBeanHelper instance.
144: */
145: com.sun.jbi.management.MBeanHelper getMBeanHelper();
146:
147: /**
148: * Get a handle to the MBeanNames service for use in creating MBean
149: * names.
150: * @return Handle to the MBeanNames service.
151: */
152: com.sun.jbi.management.MBeanNames getMBeanNames();
153:
154: /**
155: * Get the JMX MBean server used to register all MBeans in the JBI
156: * framework.
157: * @return The MBean server handle.
158: */
159: javax.management.MBeanServer getMBeanServer();
160:
161: /**
162: * Get the JNDI naming context for this implementation. This context
163: * is a standard JNDI InitialContext but its content will vary based
164: * on the environment in which the JBI implementation is running.
165: * @return The JNDI naming context.
166: */
167: javax.naming.InitialContext getNamingContext();
168:
169: /**
170: * Get the platform-specific context for this implementation.
171: * @return The PlatformContext.
172: */
173: com.sun.jbi.platform.PlatformContext getPlatformContext();
174:
175: /**
176: * Get the ServiceUnitRegistration handle.
177: * @return The ServiceUnitRegistration instance.
178: */
179: ServiceUnitRegistration getServiceUnitRegistration();
180:
181: /**
182: * Get a StringTranslator for a specific package name.
183: * @param packageName - the name of the package for which a StringTranslator
184: * is being requested.
185: * @return The StringTranslator for the named package.
186: */
187: StringTranslator getStringTranslator(String packageName);
188:
189: /**
190: * Get a StringTranslator for a specific object.
191: * @param object - the object for which a StringTranslator is being
192: * requested, using the name of the package containing the object.
193: * @return The StringTranslator for the object's package.
194: */
195: StringTranslator getStringTranslatorFor(Object object);
196:
197: /**
198: * Get the TransactionManager for this implementation. The instance
199: * returned is an implementation of the standard JTS interface. If none
200: * is available, returns null.
201: * @return A TransactionManager instance.
202: */
203: javax.transaction.TransactionManager getTransactionManager();
204:
205: /**
206: * Get a handle to the VersionInfo implementation.
207: * @return The VersionInfo instance.
208: */
209: com.sun.jbi.VersionInfo getVersionInfo();
210:
211: /**
212: * Gets the provider typeof JBI.
213: * @return The JBI provider.
214: */
215: JBIProvider getProvider();
216:
217: /**
218: * Get a copy of the WSDL factory. This needs to be done before
219: * any reading, writing, or manipulation of WSDL documents can
220: * be performed using the WSDL API.
221: *
222: * @return An instance of the WSDL factory.
223: * @exception WsdlException If the factory cannot be instantiated.
224: */
225: com.sun.jbi.wsdl2.WsdlFactory getWsdlFactory()
226: throws com.sun.jbi.wsdl2.WsdlException;
227:
228: /**
229: * This method is used to find out if start-on-deploy is enabled.
230: * When this is enabled components are started automatically when
231: * there is deployment for them.
232: * This is controlled by the property com.sun.jbi.startOnDeploy.
233: * By default start-on-deploy is enabled.
234: * It is disabled only if com.sun.jbi.startOnDeploy=false.
235: */
236: public boolean isStartOnDeployEnabled();
237:
238: /**
239: * This method is used to find out if start-on-verify is enabled.
240: * When this is enabled components are started automatically when
241: * an application has to be verified for that component.
242: * This is controlled by the property com.sun.jbi.startOnVerify.
243: * By default start-on-verify is enabled.
244: * It is disabled only if com.sun.jbi.startOnVerify=false.
245: */
246: public boolean isStartOnVerifyEnabled();
247:
248: }
|