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: * @(#)ComponentContext.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.component;
030:
031: import com.sun.jbi.StringTranslator;
032: import com.sun.jbi.management.ManagementMessageFactory;
033: import com.sun.jbi.security.KeyStoreUtil;
034: import com.sun.jbi.wsdl2.WsdlFactory;
035: import com.sun.jbi.wsdl2.WsdlException;
036:
037: import java.util.logging.Logger;
038:
039: import javax.jbi.JBIException;
040:
041: import javax.transaction.xa.XAResource;
042:
043: /**
044: * This context provides access to data needed by all components running in the
045: * JBI framework. It is created when the component is initialized and destroyed
046: * when the component is shut down.
047: *
048: * @author Sun Microsystems, Inc.
049: */
050: public interface ComponentContext extends
051: javax.jbi.component.ComponentContext {
052: /**
053: * Get the management message factory which enables JBI components
054: * to construct status and exception messages.
055: * @return the management message factory.
056: */
057: ManagementMessageFactory getManagementMessageFactory();
058:
059: /**
060: * Get a StringTranslator for a specific package name.
061: * @param packageName the name of the package that contains the resource
062: * bundle for this translator.
063: * @return the StringTranslator instance for the specified package.
064: */
065: StringTranslator getStringTranslator(String packageName);
066:
067: /**
068: * Get a StringTranslator for a specific object.
069: * @param object an object that is in the same package that contains the
070: * resource bundle for this translator.
071: * @return the StringTranslator instance for the object.
072: */
073: StringTranslator getStringTranslatorFor(Object object);
074:
075: /**
076: * Get a copy of the WSDL factory. This needs to be done before
077: * any reading, writing, or manipulation of WSDL documents can
078: * be performed using the WSDL API.
079: *
080: * @return An instance of the WSDL factory.
081: * @exception WsdlException If the factory cannot be instantiated.
082: */
083: WsdlFactory getWsdlFactory() throws WsdlException;
084:
085: /**
086: * Used by a component to register an internal XAResource with the JBI runtime.
087: * @param resource to be registered
088: * @exception JBIException if something is wrong with the XAResource.
089: */
090: void registerXAResource(XAResource resource) throws JBIException;
091:
092: /**
093: * Returns a KeyStoreUtil object that allows components to create,
094: * read, update, and delete keys. The KeyStoreUtil also allows the
095: * encryption and decryption of text using the keys stored in the
096: * private KeyStore.
097: *
098: * @return An instance of a KeyStoreUtil or null if the KeyStoreUtil
099: * service is not available
100: */
101: KeyStoreUtil getKeyStoreUtil();
102: }
|