Package javax.management

Examples of javax.management.RuntimeOperationsException


           throws AttributeNotFoundException, MBeanException,
           ReflectionException {

        // Validate the input parameters
        if (attribute == null)
            throw new RuntimeOperationsException(new IllegalArgumentException(
                    "Attribute is null"), "Attribute is null");
        String name = attribute.getName();
        Object value = attribute.getValue();
        if (name == null)
            throw new RuntimeOperationsException(new IllegalArgumentException(
                    "Attribute name is null"), "Attribute name is null");

        try {
            Object connector = getManagedResource();
            IntrospectionUtils.setProperty(connector, name, String.valueOf(value));
View Full Code Here


        throws AttributeNotFoundException, MBeanException,
        ReflectionException {
        // Validate the input parameters
        if (name == null)
            throw new RuntimeOperationsException
                (new IllegalArgumentException("Attribute name is null"),
                 "Attribute name is null");

        ContextResource cr = null;
        try {
View Full Code Here

        throws AttributeNotFoundException, MBeanException,
        ReflectionException {

        // Validate the input parameters
        if (attribute == null)
            throw new RuntimeOperationsException
                (new IllegalArgumentException("Attribute is null"),
                 "Attribute is null");
        String name = attribute.getName();
        Object value = attribute.getValue();
        if (name == null)
            throw new RuntimeOperationsException
                (new IllegalArgumentException("Attribute name is null"),
                 "Attribute name is null");
       
        ContextResource cr = null;
        try {
View Full Code Here

     * Sets the values of several attributes of the Dynamic MBean, and returns the
     * list of attributes that have been set.
     */
    public AttributeList setAttributes(AttributeList attributes)  {
  if (attributes == null)  {
      throw new RuntimeOperationsException(
    new IllegalArgumentException(
      "Null attribute list passed to setAttributes()"));
        }
 
  AttributeList resultList = new AttributeList();
View Full Code Here

     * Allows an operation to be invoked on the Dynamic MBean.
     */
  public Object invoke(String operationName, Object[] params, String[] signature)
        throws MBeanException, ReflectionException {
  if (operationName == null) {
      throw new RuntimeOperationsException(new IllegalArgumentException(
      "Null Operation name passed to invoke()"));
  }

  MBeanOperationInfo op = getOperationInfo(operationName, signature);
  Method m = null;
  Object ret = null;

  if (op == null)  {
      /*
       * If this operation was not defined as an operation in this
       * MBean, perhaps, it was defined as an 'isIs' attribute.
       */
      m = getIsIsMethod(operationName);

      if (m == null)  {
          throw new RuntimeOperationsException(new IllegalArgumentException(
      "MBean "
      + getMBeanName()
      + ": Invalid operation name and/or signature passed to invoke(): "
          + operationName)
      );
View Full Code Here

    /**
     * Enables the to get the values of several attributes of the Dynamic MBean.
     */
    public AttributeList getAttributes(String[] attributeNames)  {
  if (attributeNames == null) {
      throw new RuntimeOperationsException(
    new IllegalArgumentException(
      "MBean "
      + getMBeanName()
      + ": Null attribute list passed to getAttributes()"));
        }
View Full Code Here

        AttributeNotFoundException,
        MBeanException,
        ReflectionException  {

  if (attributeName == null) {
      throw new RuntimeOperationsException(
    new IllegalArgumentException(
      "MBean "
      + getMBeanName()
      + ": Null attribute passed to getAttribute()"));
        }
View Full Code Here

    public Object getAttribute(String attributeName) throws AttributeNotFoundException,
                                                    MBeanException,
                                                    ReflectionException {
        if ( attributeName == null ) {
            throw new RuntimeOperationsException( new IllegalArgumentException( "attributeName cannot be null" ),
                                                  "Cannot invoke a getter of " + getClass().getName() );
        } else if ( attributeName.equals( ATTR_ID ) ) {
            return getId();
        } else if ( attributeName.equals( ATTR_SESSION_COUNT ) ) {
            return Long.valueOf( getSessionCount() );
        } else if ( attributeName.equals( ATTR_GLOBALS ) ) {
            try {
                return getGlobals();
            } catch ( OpenDataException e ) {
                throw new RuntimeOperationsException( new RuntimeException( "Error retrieving globals list",
                                                                            e ),
                                                      "Error retrieving globals list " + e.getMessage() );
            }
        } else if ( attributeName.equals( ATTR_PACKAGES ) ) {
            return getPackages();
View Full Code Here

            MBeanException, ReflectionException {

        Object attribute = null;
        // Validate the input parameters
        if (name == null)
            throw new RuntimeOperationsException(new IllegalArgumentException(
                    "Attribute name is null"), "Attribute name is null");

        Object result = null;
        try {
            Connector connector = (Connector) getManagedResource();
View Full Code Here

            throws AttributeNotFoundException, MBeanException,
            ReflectionException {

        // Validate the input parameters
        if (attribute == null)
            throw new RuntimeOperationsException(new IllegalArgumentException(
                    "Attribute is null"), "Attribute is null");
        String name = attribute.getName();
        Object value = attribute.getValue();
        if (name == null)
            throw new RuntimeOperationsException(new IllegalArgumentException(
                    "Attribute name is null"), "Attribute name is null");

        try {
            Connector connector = (Connector) getManagedResource();
            IntrospectionUtils.setProperty(connector, name, String.valueOf(value));
View Full Code Here

TOP

Related Classes of javax.management.RuntimeOperationsException

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.