1 25 26 package org.objectweb.petals.jbi.component.context; 27 28 import java.util.MissingResourceException ; 29 import java.util.logging.Logger ; 30 31 import javax.jbi.JBIException; 32 import javax.jbi.component.ComponentContext; 33 import javax.jbi.management.MBeanNames; 34 import javax.jbi.messaging.DeliveryChannel; 35 import javax.jbi.messaging.MessagingException; 36 import javax.jbi.servicedesc.ServiceEndpoint; 37 import javax.management.MBeanServer ; 38 import javax.naming.InitialContext ; 39 import javax.xml.namespace.QName ; 40 41 import org.w3c.dom.Document ; 42 import org.w3c.dom.DocumentFragment ; 43 44 52 public class ComponentContextForInstallation implements ComponentContext { 53 protected ComponentContext context; 54 55 61 public ComponentContextForInstallation(ComponentContext context) { 62 this.context = context; 63 } 64 65 69 public ServiceEndpoint activateEndpoint(QName serviceName, 70 String endpointName) throws JBIException { 71 throw new IllegalStateException ("Not allowed in InstallationContext"); 72 } 73 74 77 public void deactivateEndpoint(ServiceEndpoint endpoint) 78 throws JBIException { 79 throw new IllegalStateException ("Not allowed in InstallationContext"); 80 } 81 82 85 public void deregisterExternalEndpoint(ServiceEndpoint externalEndpoint) 86 throws JBIException { 87 throw new IllegalStateException ("Not allowed in InstallationContext"); 88 } 89 90 93 public String getComponentName() { 94 throw new IllegalStateException ("Not allowed in InstallationContext"); 95 } 96 97 100 public DeliveryChannel getDeliveryChannel() throws MessagingException { 101 throw new IllegalStateException ("Not allowed in InstallationContext"); 102 } 103 104 108 public ServiceEndpoint getEndpoint(QName service, String name) { 109 throw new IllegalStateException ("Not allowed in InstallationContext"); 110 } 111 112 115 public Document getEndpointDescriptor(ServiceEndpoint endpoint) 116 throws JBIException { 117 throw new IllegalStateException ("Not allowed in InstallationContext"); 118 } 119 120 123 public ServiceEndpoint[] getEndpoints(QName interfaceName) { 124 throw new IllegalStateException ("Not allowed in InstallationContext"); 125 } 126 127 130 public ServiceEndpoint[] getEndpointsForService(QName serviceName) { 131 throw new IllegalStateException ("Not allowed in InstallationContext"); 132 } 133 134 137 public ServiceEndpoint[] getExternalEndpoints(QName interfaceName) { 138 throw new IllegalStateException ("Not allowed in InstallationContext"); 139 } 140 141 144 public ServiceEndpoint[] getExternalEndpointsForService(QName serviceName) { 145 throw new IllegalStateException ("Not allowed in InstallationContext"); 146 } 147 148 153 public String getInstallRoot() { 154 return context.getInstallRoot(); 155 } 158 159 163 public Logger getLogger(String suffix, String resourceBundleName) 164 throws MissingResourceException , JBIException { 165 throw new IllegalStateException ("Not allowed in InstallationContext"); 166 } 167 168 171 public MBeanNames getMBeanNames() { 172 return context.getMBeanNames(); 173 } 174 175 178 public MBeanServer getMBeanServer() { 179 return context.getMBeanServer(); 180 } 181 182 185 public InitialContext getNamingContext() { 186 return context.getNamingContext(); 187 } 188 189 192 public Object getTransactionManager() { 193 return context.getTransactionManager(); 194 } 195 196 199 public String getWorkspaceRoot() { 200 throw new IllegalStateException ("Not allowed in InstallationContext"); 201 } 202 203 206 public void registerExternalEndpoint(ServiceEndpoint externalEndpoint) { 207 throw new IllegalStateException ("Not allowed in InstallationContext"); 208 } 209 210 214 public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) { 215 throw new IllegalStateException ("Not allowed in InstallationContext"); 216 } 217 218 } 219 | Popular Tags |