Refine search
@SuppressWarnings("unchecked") @Override protected T readValue(DataInput input) throws IOException { Unmarshaller unmarshaller = prepareForUnMarshalling(input); try { return ((T) unmarshaller.readObject()); } catch (ClassNotFoundException e) { throw new IOException(e); } catch (ClassCastException e) { throw new IOException(e); } }
@SuppressWarnings("unchecked") @Override protected T readValue(DataInput input) throws IOException { Unmarshaller unmarshaller = prepareForUnMarshalling(input); try { return ((T) unmarshaller.readObject()); } catch (ClassNotFoundException e) { throw new IOException(e); } catch (ClassCastException e) { throw new IOException(e); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("Notification"); byte paramType = input.readByte(); if (paramType != INTEGER) { throw new IOException("Unexpected paramType"); } int listenerId = input.readInt(); paramType = input.readByte(); if (paramType != NOTIFICATION) { throw new IOException("Unexpected paramType"); } try { Unmarshaller unmarshaller = prepareForUnMarshalling(input); Notification notification = unmarshaller.readObject(Notification.class); paramType = unmarshaller.readByte(); if (paramType != OBJECT) { throw new IOException("Unexpected paramType"); } Object handBack = unmarshaller.readObject(); localNotificationManager.notify(listenerId, notification, handBack); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } }
@Override public void handle(DataInput input, int correlationId) throws IOException { log.trace("Notification"); byte paramType = input.readByte(); if (paramType != INTEGER) { throw new IOException("Unexpected paramType"); } int listenerId = input.readInt(); paramType = input.readByte(); if (paramType != NOTIFICATION) { throw new IOException("Unexpected paramType"); } try { Unmarshaller unmarshaller = prepareForUnMarshalling(input); Notification notification = unmarshaller.readObject(Notification.class); paramType = unmarshaller.readByte(); if (paramType != OBJECT) { throw new IOException("Unexpected paramType"); } Object handBack = unmarshaller.readObject(); localNotificationManager.notify(listenerId, notification, handBack); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe); } }
@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("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("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("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("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("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); } }
throw new IOException("Unexpected paramType"); name = unmarshaller.readObject(ObjectName.class); } else if (paramType == OBJECT_NAME) { remoteNotification = false; listener = unmarshaller.readObject(ObjectName.class); } else { throw new IOException("Unexpected paramType"); throw new IOException("Unexpected paramType"); filter = unmarshaller.readObject(NotificationFilter.class); throw new IOException("Unexpected paramType"); handback = unmarshaller.readObject(); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe);
throw new IOException("Unexpected paramType"); objectName = unmarshaller.readObject(ObjectName.class); switchClassLoaderForMBean(objectName, resolver); throw new IOException("Unexpected paramType"); attributes = unmarshaller.readObject(AttributeList.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe);
@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"); name = unmarshaller.readObject(ObjectName.class); } else if (paramType == OBJECT_NAME) { remoteNotification = false; listener = unmarshaller.readObject(ObjectName.class); } else { throw new IOException("Unexpected paramType"); throw new IOException("Unexpected paramType"); filter = unmarshaller.readObject(NotificationFilter.class); throw new IOException("Unexpected paramType"); handback = unmarshaller.readObject(); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe);
Messages.log.unexpectedParameterType(Protocol.P_NAME, parameterType); final Name name = unmarshaller.readObject(Name.class); parameterType = unmarshaller.readUnsignedByte(); if (parameterType != Protocol.P_OBJECT) { Messages.log.unexpectedParameterType(Protocol.P_OBJECT, parameterType); final Object object = unmarshaller.readObject(); if (rebind) { localContext.rebind(name, object); final Object object = unmarshaller.readObject(); if (rebind) { localContext.rebind(name, object); throw new IOException(e); } catch (NamingException e) { writeExceptionResponse(e, messageId, id);
@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("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); } }
byte parameterType = input.readByte(); if (parameterType != expectedType) { throw new IOException("Unexpected response parameter received."); byte parameterType = input.readByte(); if (parameterType != EXCEPTION) { throw new IOException("Unexpected response parameter received."); response.e = unmarshaller.readObject(Exception.class); } else { future.setException(new IOException("Outcome not understood"));
throw new IOException("Unexpected paramType"); objectName = unmarshaller.readObject(ObjectName.class); switchClassLoaderForMBean(objectName, resolver); throw new IOException("Unexpected paramType"); attributes = unmarshaller.readObject(AttributeList.class); } catch (ClassNotFoundException cnfe) { throw new IOException(cnfe);