Package javax.management.remote.message

Examples of javax.management.remote.message.MBeanServerResponseMessage


    throws Exception {
        final StreamMBeanServerRequestMessage request =
            new StreamMBeanServerRequestMessage(methodId, params, null);
                // delegationSubject to be considered: todo
        connection.send(request);
        MBeanServerResponseMessage response = null;       
        try {
            response = ((MBeanServerResponseMessage)connection.receive());
        } catch(RedirectException ex) {
            // if auto redirect is disabled throw the exception as is
            if (!autoRedirect) throw ex;
View Full Code Here


  MBeanServerRequestMessage req =
      new MBeanServerRequestMessage(methodId,
            params,
            delegationSubject);

  MBeanServerResponseMessage resp;

  try {
      resp = (MBeanServerResponseMessage)
    connection.sendWithReturn(req);
  } catch (IOException e) {
      if (terminated || !reconnect ||
    e instanceof InterruptedIOException) throw e;
     
      communicatorAdmin.gotIOException(e);
     
      resp = (MBeanServerResponseMessage)
    connection.sendWithReturn(req);
  }

  Object wrappedResult = resp.getWrappedResult(); // may throw exception
  Object result;

  try {
      result = serialization.unwrap(wrappedResult, myloader);
  } catch (ClassNotFoundException e) {
      IOException ioe = new IOException(e.toString());
      EnvHelp.initCause(ioe, e);
      throw ioe;
  }
 
  if (resp.isException())
      throw (Exception) result;
 
  return result;
    }
View Full Code Here

    }

    Object result =
        AccessController.doPrivileged(new PrivilegedRequestJob(req),
              reqACC);
    return new MBeanServerResponseMessage(
             req.getMessageId(),
             result,
             false);
      } catch (Exception e) {
    e = extractException(e);
    if (logger.traceOn()) {
        logger.trace("RequestHandler-execute",
         "Got an exception: " + e,
         e);
    }
    return new MBeanServerResponseMessage(
              req.getMessageId(),
              wrapException(e),
              true);
      } catch (Error r) {
    if (logger.traceOn()) {
        logger.trace("RequestHandler-execute",
         "Got an error: " + r,
         r);
    }
    final JMXServerErrorException see =
        new JMXServerErrorException(r.toString(),r);
    return new MBeanServerResponseMessage(
              req.getMessageId(),
              wrapException(see),
              true);
      }
  }
View Full Code Here

TOP

Related Classes of javax.management.remote.message.MBeanServerResponseMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.