1 25 package org.objectweb.jonas.jmx; 26 27 import javax.management.Attribute ; 28 import javax.management.AttributeList ; 29 import javax.management.AttributeNotFoundException ; 30 import javax.management.InstanceNotFoundException ; 31 import javax.management.IntrospectionException ; 32 import javax.management.InvalidAttributeValueException ; 33 import javax.management.MBeanException ; 34 import javax.management.MBeanInfo ; 35 import javax.management.MBeanServer ; 36 import javax.management.NotificationFilter ; 37 import javax.management.NotificationListener ; 38 import javax.management.ObjectName ; 39 import javax.management.QueryExp ; 40 import javax.management.ReflectionException ; 41 import javax.rmi.PortableRemoteObject ; 42 import java.rmi.RemoteException ; 43 44 45 51 public class RMIConnectorImpl extends PortableRemoteObject implements RMIConnector { 52 protected MBeanServer server; 53 54 public RMIConnectorImpl(MBeanServer server) throws RemoteException { 55 super(); 56 this.server = server; 57 } 58 59 66 public java.util.Set queryNames(ObjectName name, 67 QueryExp query) 68 throws RemoteException { 69 return server.queryNames(name, query); 70 } 71 72 77 public boolean isRegistered(ObjectName name) 78 throws RemoteException 79 { 80 return server.isRegistered(name); 81 } 82 83 89 public java.lang.Object getAttribute(ObjectName name, 90 java.lang.String attribute) 91 throws MBeanException , 92 AttributeNotFoundException , 93 InstanceNotFoundException , 94 ReflectionException , 95 RemoteException { 96 return server.getAttribute(name, attribute); 97 } 98 99 public AttributeList getAttributes(ObjectName name, 100 String [] attributes) 101 throws InstanceNotFoundException , 102 ReflectionException , 103 RemoteException { 104 return server.getAttributes(name, attributes); 105 } 106 110 public void setAttribute(ObjectName name, 111 Attribute attribute) 112 throws InstanceNotFoundException , 113 AttributeNotFoundException , 114 InvalidAttributeValueException , 115 MBeanException , 116 ReflectionException , 117 RemoteException { 118 server.setAttribute(name, attribute); 119 } 120 121 public AttributeList setAttributes(ObjectName name, 122 AttributeList attributes) 123 throws InstanceNotFoundException , 124 ReflectionException , 125 RemoteException { 126 return server.setAttributes(name, attributes); 127 } 128 138 public Object invoke(ObjectName name, 139 java.lang.String operationName, 140 java.lang.Object [] params, 141 java.lang.String [] signature) 142 throws InstanceNotFoundException , 143 MBeanException , 144 ReflectionException , 145 RemoteException 146 { 147 return server.invoke(name, operationName, params, signature); 148 } 149 150 157 public MBeanInfo getMBeanInfo(ObjectName name) 158 throws InstanceNotFoundException , 159 IntrospectionException , 160 ReflectionException , 161 RemoteException 162 { 163 return this.server.getMBeanInfo(name); 164 } 165 166 174 public void addNotificationListener(ObjectName name, 175 NotificationListener listener, 176 NotificationFilter filter, 177 Object handback) 178 throws InstanceNotFoundException , 179 RemoteException 180 { 181 this.server.addNotificationListener(name, listener, filter, handback); 182 } 183 184 192 public void addNotificationListener(ObjectName name, 193 ObjectName listener, 194 NotificationFilter filter, 195 Object handback) 196 throws InstanceNotFoundException , 197 RemoteException 198 { 199 this.server.addNotificationListener(name, listener, filter, handback); 200 } 201 } 202 | Popular Tags |