@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("IsRegistered"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } boolean registered = server.getMBeanServerConnection().isRegistered(objectName); writeResponse(registered, IS_REGISTERED, correlationId); log.tracef("[%d] IsRegistered - Success Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("QueryNames"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } ObjectName objectName; QueryExp query; try { Unmarshaller unmarshaller = prepareForUnMarshalling(input); objectName = unmarshaller.readObject(ObjectName.class); paramType = unmarshaller.readByte(); if (paramType != QUERY_EXP) { throw new IOException("Unexpected paramType"); } query = unmarshaller.readObject(QueryExp.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } Set<ObjectName> instances = server.getMBeanServerConnection().queryNames(objectName, query); writeResponse(instances, SET_OBJECT_NAME, QUERY_NAMES, correlationId); log.tracef("[%d] QueryNames - Success Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("QueryMBeans"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } ObjectName objectName; QueryExp query; try { Unmarshaller unmarshaller = prepareForUnMarshalling(input); objectName = unmarshaller.readObject(ObjectName.class); paramType = unmarshaller.readByte(); if (paramType != QUERY_EXP) { throw new IOException("Unexpected paramType"); } query = unmarshaller.readObject(QueryExp.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } Set<ObjectInstance> instances = server.getMBeanServerConnection().queryMBeans(objectName, query); writeResponse(instances, SET_OBJECT_INSTANCE, QUERY_MBEANS, correlationId); log.tracef("[%d] QueryMBeans - Success Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("GetObjectInstance"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } try { ObjectInstance objectInstance = server.getMBeanServerConnection().getObjectInstance(objectName); writeResponse(objectInstance, OBJECT_INSTANCE, GET_OBJECT_INSTANCE, correlationId); log.tracef("[%d] GetObjectInstance - Success Response Sent", correlationId); } catch (InstanceNotFoundException e) { writeResponse(e, GET_OBJECT_INSTANCE, correlationId); log.tracef("[%d] GetObjectInstance - Failure Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("IsInstanceOf"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } paramType = unmarshaller.readByte(); if (paramType != STRING) { throw new IOException("Unexpected paramType"); } String className = unmarshaller.readUTF(); try { boolean instanceOf = server.getMBeanServerConnection().isInstanceOf(objectName, className); writeResponse(instanceOf, INSTANCE_OF, correlationId); log.tracef("[%d] IsInstanceOf - Success Response Sent", correlationId); } catch (InstanceNotFoundException e) { writeResponse(e, INSTANCE_OF, correlationId); log.tracef("[%d] IsInstanceOf - Failure Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("UnregisterMBean"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } try { server.getMBeanServerConnection().unregisterMBean(objectName); writeResponse(UNREGISTER_MBEAN, correlationId); log.tracef("[%d] UnregisterMBean - Success Response Sent", correlationId); } catch (MBeanRegistrationException e) { writeResponse(e, UNREGISTER_MBEAN, correlationId); log.tracef("[%d] UnregisterMBean - Failure Response Sent", correlationId); } catch (InstanceNotFoundException e) { writeResponse(e, UNREGISTER_MBEAN, correlationId); log.tracef("[%d] UnregisterMBean - Failure Response Sent", correlationId); } }
throw new IOException("Unexpected paramType"); Unmarshaller unmarshaller = prepareForUnMarshalling(input); try { name = unmarshaller.readObject(ObjectName.class);
final Unmarshaller unmarshaller = prepareForUnMarshalling(input, resolver); ObjectName objectName; AttributeList attributes;
Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName;
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("GetMBeanInfo"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } try { MBeanInfo info = server.getMBeanServerConnection().getMBeanInfo(objectName); writeResponse(info, MBEAN_INFO, GET_MBEAN_INFO, correlationId); log.tracef("[%d] GetMBeanInfo - Success Response Sent", correlationId); } catch (IntrospectionException e) { writeResponse(e, MBEAN_INFO, correlationId); log.tracef("[%d] GetMBeanInfo - Failure Response Sent", correlationId); } catch (InstanceNotFoundException e) { writeResponse(e, MBEAN_INFO, correlationId); log.tracef("[%d] GetMBeanInfo - Failure Response Sent", correlationId); } catch (ReflectionException e) { writeResponse(e, MBEAN_INFO, correlationId); log.tracef("[%d] GetMBeanInfo - Failure Response Sent", correlationId); } }
Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName;
Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName name; boolean remoteNotification;
Unmarshaller unmarshaller = prepareForUnMarshalling(input, resolver); ObjectName objectName; String operationName;
Unmarshaller unmarshaller = prepareForUnMarshalling(input, resolver); ObjectName objectName; Attribute attr;
final ClassLoaderSwitchingClassResolver resolver = new ClassLoaderSwitchingClassResolver( ServerProxy.class.getClassLoader()); Unmarshaller unmarshaller = prepareForUnMarshalling(input, resolver); for (int i = 0; i < paramCount; i++) { byte param = unmarshaller.readByte();
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("IsRegistered"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } boolean registered = server.getMBeanServerConnection().isRegistered(objectName); writeResponse(registered, IS_REGISTERED, correlationId); log.tracef("[%d] IsRegistered - Success Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("IsRegistered"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } boolean registered = server.getMBeanServerConnection().isRegistered(objectName); writeResponse(registered, IS_REGISTERED, correlationId); log.tracef("[%d] IsRegistered - Success Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("QueryMBeans"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } ObjectName objectName; QueryExp query; try { Unmarshaller unmarshaller = prepareForUnMarshalling(input); objectName = unmarshaller.readObject(ObjectName.class); paramType = unmarshaller.readByte(); if (paramType != QUERY_EXP) { throw new IOException("Unexpected paramType"); } query = unmarshaller.readObject(QueryExp.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } Set<ObjectInstance> instances = server.getMBeanServerConnection().queryMBeans(objectName, query); writeResponse(instances, SET_OBJECT_INSTANCE, QUERY_MBEANS, correlationId); log.tracef("[%d] QueryMBeans - Success Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("GetObjectInstance"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } try { ObjectInstance objectInstance = server.getMBeanServerConnection().getObjectInstance(objectName); writeResponse(objectInstance, OBJECT_INSTANCE, GET_OBJECT_INSTANCE, correlationId); log.tracef("[%d] GetObjectInstance - Success Response Sent", correlationId); } catch (InstanceNotFoundException e) { writeResponse(e, GET_OBJECT_INSTANCE, correlationId); log.tracef("[%d] GetObjectInstance - Failure Response Sent", correlationId); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("GetObjectInstance"); byte paramType = input.readByte(); if (paramType != OBJECT_NAME) { throw new IOException("Unexpected paramType"); } Unmarshaller unmarshaller = prepareForUnMarshalling(input); ObjectName objectName; try { objectName = unmarshaller.readObject(ObjectName.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } try { ObjectInstance objectInstance = server.getMBeanServerConnection().getObjectInstance(objectName); writeResponse(objectInstance, OBJECT_INSTANCE, GET_OBJECT_INSTANCE, correlationId); log.tracef("[%d] GetObjectInstance - Success Response Sent", correlationId); } catch (InstanceNotFoundException e) { writeResponse(e, GET_OBJECT_INSTANCE, correlationId); log.tracef("[%d] GetObjectInstance - Failure Response Sent", correlationId); } }