1 22 package org.objectweb.petals.jbi.component.mock; 23 24 import java.util.MissingResourceException ; 25 import java.util.logging.Logger ; 26 27 import javax.jbi.JBIException; 28 import javax.jbi.component.ComponentContext; 29 import javax.jbi.management.MBeanNames; 30 import javax.jbi.messaging.DeliveryChannel; 31 import javax.jbi.messaging.MessagingException; 32 import javax.jbi.servicedesc.ServiceEndpoint; 33 import javax.management.MBeanServer ; 34 import javax.naming.InitialContext ; 35 import javax.xml.namespace.QName ; 36 37 import org.w3c.dom.Document ; 38 import org.w3c.dom.DocumentFragment ; 39 40 44 public class MockComponentContext implements ComponentContext { 45 46 private boolean getMBeanNames; 47 48 private boolean getMBeanServer; 49 50 private boolean getNamingContext; 51 52 private boolean getTransactionManager; 53 54 public ServiceEndpoint activateEndpoint(QName serviceName, 55 String endpointName) throws JBIException { 56 return null; 57 } 58 59 public void deactivateEndpoint(ServiceEndpoint endpoint) 60 throws JBIException { 61 } 62 63 public void deregisterExternalEndpoint(ServiceEndpoint externalEndpoint) 64 throws JBIException { 65 } 66 67 public String getComponentName() { 68 return null; 69 } 70 71 public DeliveryChannel getDeliveryChannel() throws MessagingException { 72 return null; 73 } 74 75 public ServiceEndpoint getEndpoint(QName service, String name) { 76 return null; 77 } 78 79 public Document getEndpointDescriptor(ServiceEndpoint endpoint) 80 throws JBIException { 81 return null; 82 } 83 84 public ServiceEndpoint[] getEndpoints(QName interfaceName) { 85 return null; 86 } 87 88 public ServiceEndpoint[] getEndpointsForService(QName serviceName) { 89 return null; 90 } 91 92 public ServiceEndpoint[] getExternalEndpoints(QName interfaceName) { 93 return null; 94 } 95 96 public ServiceEndpoint[] getExternalEndpointsForService(QName serviceName) { 97 return null; 98 } 99 100 public String getInstallRoot() { 101 return "root"; 102 } 103 104 public Logger getLogger(String suffix, String resourceBundleName) 105 throws MissingResourceException , JBIException { 106 return null; 107 } 108 109 public MBeanNames getMBeanNames() { 110 getMBeanNames = true; 111 return null; 112 } 113 114 public MBeanServer getMBeanServer() { 115 getMBeanServer = true; 116 return null; 117 } 118 119 public InitialContext getNamingContext() { 120 getNamingContext = true; 121 return null; 122 } 123 124 public Object getTransactionManager() { 125 getTransactionManager = true; 126 return null; 127 } 128 129 public String getWorkspaceRoot() { 130 return null; 131 } 132 133 public boolean isGetMBeanNames() { 134 return getMBeanNames; 135 } 136 137 public boolean isGetMBeanServer() { 138 return getMBeanServer; 139 } 140 141 public boolean isGetNamingContext() { 142 return getNamingContext; 143 } 144 145 public boolean isGetTransactionManager() { 146 return getTransactionManager; 147 } 148 149 public void registerExternalEndpoint(ServiceEndpoint externalEndpoint) 150 throws JBIException { 151 } 152 153 public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) { 154 return null; 155 } 156 157 public void setGetMBeanNames(boolean getMBeanNames) { 158 this.getMBeanNames = getMBeanNames; 159 } 160 161 public void setGetMBeanServer(boolean getMBeanServer) { 162 this.getMBeanServer = getMBeanServer; 163 } 164 165 public void setGetNamingContext(boolean getNamingContext) { 166 this.getNamingContext = getNamingContext; 167 } 168 169 public void setGetTransactionManager(boolean getTransactionManager) { 170 this.getTransactionManager = getTransactionManager; 171 } 172 173 } 174 | Popular Tags |