Examples of AdminResponseConfigurator


Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

        reqConfigurator.setOperationParams(params);
        reqConfigurator.setOperationSignature(signature);
        reqConfigurator.setClientVersion(ADMIN_CLIENT_VERSION);

        AdminResponse response = sendRequest(request);
        AdminResponseConfigurator resConfigurator =
            new AdminResponseConfigurator(response);
        if (resConfigurator.hasException())
        {
            Throwable t = resConfigurator.getException();
            if (t instanceof InstanceNotFoundException)
            {
                throw (InstanceNotFoundException)t;
            }
            else if (t instanceof MBeanException)
            {
                throw (MBeanException)t;
            }
            else if (t instanceof ReflectionException)
            {
                throw (ReflectionException)t;
            }
            else if (t instanceof RuntimeException)
            {
                throw (RuntimeException)t;
            }
            else if (t instanceof Error)
            {
                throw new RuntimeErrorException((Error)t);
            }
        }
        else
        {
            returnValue = resConfigurator.getReturnValue();
        }
        return returnValue;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

        reqConfigurator.setObjectName(mbeanName);
        reqConfigurator.setAttributeName(attributeName);
        reqConfigurator.setClientVersion(ADMIN_CLIENT_VERSION);
        AdminResponse response = sendRequest(request);
        //Assert.assert(response);
        AdminResponseConfigurator resConfigurator =
            new AdminResponseConfigurator(response);
        if (resConfigurator.hasException())
        {
            Throwable t = resConfigurator.getException();
            if (t instanceof AttributeNotFoundException)
            {
                throw (AttributeNotFoundException)t;
            }
            else if (t instanceof InstanceNotFoundException)
            {
                throw (InstanceNotFoundException)t;
            }
            else if (t instanceof MBeanException)
            {
                throw (MBeanException)t;
            }
            else if (t instanceof ReflectionException)
            {
                throw (ReflectionException)t;
            }
            else if (t instanceof RuntimeException)
            {
                throw (RuntimeException)t;
            }
            else if (t instanceof Error)
            {
                throw new RuntimeErrorException((Error)t);
            }
        }
        else
        {
            returnValue = resConfigurator.getReturnValue();
        }
        return returnValue;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

        reqConfigurator.setObjectName(mbeanName);
        reqConfigurator.setAttribute(attribute);
        reqConfigurator.setClientVersion(ADMIN_CLIENT_VERSION);
        AdminResponse response = sendRequest(request);
        //Assert.assert(response);
        AdminResponseConfigurator resConfigurator =
            new AdminResponseConfigurator(response);
        if (resConfigurator.hasException())
        {
            Throwable t = resConfigurator.getException();
            if (t instanceof AttributeNotFoundException)
            {
                throw (AttributeNotFoundException)t;
            }
            else if (t instanceof InvalidAttributeValueException)
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

        reqConfigurator.setObjectName(mbeanName);
        reqConfigurator.setAttributeNames(attributes);
        reqConfigurator.setClientVersion(ADMIN_CLIENT_VERSION);
        AdminResponse response = sendRequest(request);
        //Assert.assert(response);
        AdminResponseConfigurator resConfigurator =
            new AdminResponseConfigurator(response);
        if (resConfigurator.hasException())
        {
            Throwable t = resConfigurator.getException();
            if (t instanceof InstanceNotFoundException)
            {
                throw (InstanceNotFoundException)t;
            }
            else if (t instanceof ReflectionException)
            {
                throw (ReflectionException)t;
            }
            else if (t instanceof RuntimeException)
            {
                throw (RuntimeException)t;
            }
            else if (t instanceof Error)
            {
                throw new RuntimeErrorException((Error)t);
            }
        }
        else
        {
            values = (AttributeList) resConfigurator.getReturnValue();
        }
        return values;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

        reqConfigurator.setObjectName(mbeanName);
        reqConfigurator.setAttributeList(attributes);
        reqConfigurator.setClientVersion(ADMIN_CLIENT_VERSION);
        AdminResponse response = sendRequest(request);
        //Assert.assert(response);
        AdminResponseConfigurator resConfigurator =
            new AdminResponseConfigurator(response);
        if (resConfigurator.hasException())
        {
            Throwable t = resConfigurator.getException();
            if (t instanceof InstanceNotFoundException)
            {
                throw (InstanceNotFoundException)t;
            }
            else if (t instanceof ReflectionException)
            {
                throw (ReflectionException)t;
            }
            else if (t instanceof RuntimeException)
            {
                throw (RuntimeException)t;
            }
            else if (t instanceof Error)
            {
                throw new RuntimeErrorException((Error)t);
            }
        }
        else
        {
            values = (AttributeList) resConfigurator.getReturnValue();
        }
        return values;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

        }
       
        // here we are only in case of non-matching version
        // prepare and wrap exception
        AdminResponse response = new AdminResponse();
        AdminResponseConfigurator config = new AdminResponseConfigurator(response);
        String msg;
        if(clientVersion == null)
            msg = localStrings.getString( "admin.server.core.servlet.no_client_version" );
        else
            msg = localStrings.getString( "admin.server.core.servlet.nonsupported_client_version", clientVersion);
        config.setException(new AFRuntimeException(msg));
        return response;
  }
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

            response = callSetAttributes(req);
        }
        else
        {
            response = new AdminResponse();
            AdminResponseConfigurator config = new
                AdminResponseConfigurator(response);
            config.setException(new Exception("No Such Type"));
      }
      return ( response );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

    }
    private synchronized AdminResponse callInvoke(AdminRequest req)
    {
        Object  invokeResult = null;
        AdminResponse response = new AdminResponse();
        AdminResponseConfigurator responseConfig = new
            AdminResponseConfigurator(response);
        AdminRequestConfigurator requestConfig = new
            AdminRequestConfigurator(req);
        ObjectName  objName      = requestConfig.getObjectName();
        String    oprName      = requestConfig.getOperationName();
        Object[]  params      = requestConfig.getOperationParams();
        String[]  signature   = requestConfig.getOperationSignature();
        try
        {
            invokeResult =
                mMBeanServer.invoke(objName, oprName, params, signature);
            responseConfig.setReturnValue((Serializable)invokeResult);
            mLogger.log(Level.FINE, "comm.remote_invoke_ok", objName);
        }
        catch(Exception e)
        {
            mLogger.log(Level.WARNING, "comm.remote_invoke_failed", unwrapMBeanException(e));
          responseConfig.setException(e);
      }
      return ( response );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

    private synchronized AdminResponse callGetAttribute(AdminRequest req)
    {
        Object  invokeResult = null;
        AdminResponse response = new AdminResponse();
        AdminResponseConfigurator responseConfig = new
            AdminResponseConfigurator(response);
        AdminRequestConfigurator requestConfig = new
            AdminRequestConfigurator(req);
        ObjectName  objName      = requestConfig.getObjectName();
        String      attrName    = requestConfig.getAttributeName();
        try
        {
            invokeResult = mMBeanServer.getAttribute(objName, attrName);
            responseConfig.setReturnValue((Serializable)invokeResult);
            mLogger.log(Level.FINE, "comm.get_attr_ok", objName);
        }
        catch(Exception e)
        {
            mLogger.log(Level.WARNING, "comm.get_attr_failed", unwrapMBeanException(e));
          responseConfig.setException(e);
        }
        return ( response );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.common.AdminResponseConfigurator

    }
    private synchronized AdminResponse callSetAttribute(AdminRequest req)
    {
        Object  invokeResult = null;
        AdminResponse response = new AdminResponse();
        AdminResponseConfigurator responseConfig = new
            AdminResponseConfigurator(response);
        AdminRequestConfigurator requestConfig = new
            AdminRequestConfigurator(req);
        ObjectName  objName      = requestConfig.getObjectName();
        Attribute   attribute   = requestConfig.getAttribute();
        try
        {
            mMBeanServer.setAttribute(objName, attribute);
            String setValue = "value set: " + attribute.getValue();
            responseConfig.setReturnValue(setValue);
            mLogger.log(Level.FINE, "comm.set_attr_ok", objName);
        }
        catch(Exception e)
        {
            mLogger.log(Level.WARNING, "comm.set_attr_failed", unwrapMBeanException(e));
          responseConfig.setException(e);
        }
        return ( response );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.