001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package javax.jbi.component;
018
019 import java.util.MissingResourceException;
020 import java.util.logging.Logger;
021
022 import javax.jbi.JBIException;
023 import javax.jbi.messaging.DeliveryChannel;
024 import javax.jbi.messaging.MessagingException;
025 import javax.jbi.servicedesc.ServiceEndpoint;
026
027 import javax.xml.namespace.QName;
028
029 import org.w3c.dom.Document;
030 import org.w3c.dom.DocumentFragment;
031
032 public interface ComponentContext {
033 ServiceEndpoint activateEndpoint(QName serviceName, String endpointName) throws JBIException;
034
035 void deactivateEndpoint(ServiceEndpoint endpoint) throws JBIException;
036
037 void registerExternalEndpoint(ServiceEndpoint externalEndpoint) throws JBIException;
038
039 void deregisterExternalEndpoint(ServiceEndpoint externalEndpoint) throws JBIException;
040
041 ServiceEndpoint resolveEndpointReference(DocumentFragment epr);
042
043 String getComponentName();
044
045 DeliveryChannel getDeliveryChannel() throws MessagingException;
046
047 ServiceEndpoint getEndpoint(QName service, String name);
048
049 Document getEndpointDescriptor(ServiceEndpoint endpoint) throws JBIException;
050
051 ServiceEndpoint[] getEndpoints(QName interfaceName);
052
053 ServiceEndpoint[] getEndpointsForService(QName serviceName);
054
055 ServiceEndpoint[] getExternalEndpoints(QName interfaceName);
056
057 ServiceEndpoint[] getExternalEndpointsForService(QName serviceName);
058
059 String getInstallRoot();
060
061 Logger getLogger(String suffix, String resourceBundleName) throws MissingResourceException, JBIException;
062
063 javax.jbi.management.MBeanNames getMBeanNames();
064
065 javax.management.MBeanServer getMBeanServer();
066
067 javax.naming.InitialContext getNamingContext();
068
069 Object getTransactionManager();
070
071 String getWorkspaceRoot();
072
073 }