1 package org.apache.tools.ant.taskdefs.optional.jmx.connector.jboss; 2 3 52 53 import java.io.ObjectInputStream ; 54 import java.util.Set ; 55 import javax.management.*; 56 import org.jboss.jmx.connector.RemoteMBeanServer; 57 58 65 public class JBossMBeanServer implements javax.management.MBeanServer { 66 67 RemoteMBeanServer remoteServer; 68 69 70 public JBossMBeanServer(RemoteMBeanServer remoteServer) { 71 this.remoteServer = remoteServer; 72 } 73 74 public void addNotificationListener(ObjectName objectName, NotificationListener notificationListener, NotificationFilter notificationFilter, Object obj) throws InstanceNotFoundException { 75 remoteServer.addNotificationListener(objectName, notificationListener, notificationFilter, obj); 76 } 77 78 public void addNotificationListener(ObjectName objectName, ObjectName objectName1, NotificationFilter notificationFilter, Object obj) throws InstanceNotFoundException { 79 remoteServer.addNotificationListener(objectName, objectName1, notificationFilter, obj); 80 } 81 82 public ObjectInstance createMBean(String str, ObjectName objectName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException { 83 return remoteServer.createMBean(str,objectName); 84 } 85 86 public ObjectInstance createMBean(String str, ObjectName objectName, ObjectName objectName2) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException { 87 return remoteServer.createMBean(str,objectName,objectName2); 88 } 89 90 public ObjectInstance createMBean(String str, ObjectName objectName, Object [] obj, String [] str3) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException { 91 return remoteServer.createMBean(str,objectName,obj,str3); 92 } 93 94 public ObjectInstance createMBean(String str, ObjectName objectName, ObjectName objectName2, Object [] obj, String [] str4) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException { 95 return remoteServer.createMBean(str, objectName, objectName2, obj, str4); 96 } 97 98 public ObjectInputStream deserialize(String str, byte[] values) throws OperationsException, ReflectionException { 99 throw new java.lang.RuntimeException ("operation not supported"); 100 } 101 102 public ObjectInputStream deserialize(ObjectName objectName, byte[] values) throws InstanceNotFoundException, OperationsException { 103 throw new java.lang.RuntimeException ("operation not supported"); 104 } 105 106 public ObjectInputStream deserialize(String str, ObjectName objectName, byte[] values) throws InstanceNotFoundException, OperationsException, ReflectionException { 107 throw new java.lang.RuntimeException ("operation not supported"); 108 } 109 110 public Object getAttribute(ObjectName objectName, String str) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException { 111 return remoteServer.getAttribute(objectName,str); 112 } 113 114 public AttributeList getAttributes(ObjectName objectName, String [] str) throws InstanceNotFoundException, ReflectionException { 115 return remoteServer.getAttributes(objectName,str); 116 } 117 118 public String getDefaultDomain() { 119 return remoteServer.getDefaultDomain(); 120 } 121 122 public Integer getMBeanCount() { 123 return remoteServer.getMBeanCount(); 124 } 125 126 public javax.management.MBeanInfo getMBeanInfo(ObjectName objectName) throws InstanceNotFoundException, javax.management.IntrospectionException , ReflectionException { 127 return remoteServer.getMBeanInfo(objectName); 128 } 129 130 public ObjectInstance getObjectInstance(ObjectName objectName) throws InstanceNotFoundException { 131 return remoteServer.getObjectInstance(objectName); 132 } 133 134 public Object instantiate(String str) throws ReflectionException, MBeanException { 135 throw new java.lang.RuntimeException ("operation not supported"); 136 } 137 138 public Object instantiate(String str, ObjectName objectName) throws ReflectionException, MBeanException, InstanceNotFoundException { 139 throw new java.lang.RuntimeException ("operation not supported"); 140 } 141 142 public Object instantiate(String str, Object [] obj, String [] str2) throws ReflectionException, MBeanException { 143 throw new java.lang.RuntimeException ("operation not supported"); 144 } 145 146 public Object instantiate(String str, ObjectName objectName, Object [] obj, String [] str3) throws ReflectionException, MBeanException, InstanceNotFoundException { 147 throw new java.lang.RuntimeException ("operation not supported"); 148 } 149 150 public Object invoke(ObjectName objectName, String str, Object [] obj, String [] str3) throws InstanceNotFoundException, MBeanException, ReflectionException { 151 return remoteServer.invoke(objectName,str,obj,str3); 152 } 153 154 public boolean isInstanceOf(ObjectName objectName, String str) throws InstanceNotFoundException { 155 return remoteServer.isInstanceOf(objectName,str); 156 } 157 158 public boolean isRegistered(ObjectName objectName) { 159 return remoteServer.isRegistered(objectName); 160 } 161 162 public Set queryMBeans(ObjectName objectName, QueryExp queryExp) { 163 return remoteServer.queryMBeans(objectName,queryExp); 164 } 165 166 public Set queryNames(ObjectName objectName, QueryExp queryExp) { 167 return remoteServer.queryNames(objectName,queryExp); 168 } 169 170 public ObjectInstance registerMBean(Object obj, ObjectName objectName) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException { 171 throw new java.lang.RuntimeException ("operation not supported"); 172 } 173 174 public void removeNotificationListener(ObjectName objectName, ObjectName objectName1) throws InstanceNotFoundException, ListenerNotFoundException { 175 remoteServer.removeNotificationListener(objectName,objectName1); 176 } 177 178 public void removeNotificationListener(ObjectName objectName, NotificationListener notificationListener) throws InstanceNotFoundException, ListenerNotFoundException { 179 remoteServer.removeNotificationListener(objectName,notificationListener); 180 } 181 182 public void setAttribute(ObjectName objectName, javax.management.Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, javax.management.InvalidAttributeValueException , MBeanException, ReflectionException { 183 remoteServer.setAttribute(objectName, attribute); 184 } 185 186 public AttributeList setAttributes(ObjectName objectName, AttributeList attributeList) throws InstanceNotFoundException, ReflectionException { 187 return remoteServer.setAttributes(objectName,attributeList); 188 } 189 190 public void unregisterMBean(ObjectName objectName) throws InstanceNotFoundException, MBeanRegistrationException { 191 remoteServer.unregisterMBean(objectName); 192 } 193 194 } 195 208 | Popular Tags |