Package javax.management

Examples of javax.management.MBeanOperationInfo


  }

  private String getResult( ObjectName[] names )
      throws IntrospectionException, InstanceNotFoundException, IOException, ReflectionException {
    MBeanOperationInfo[] ops;
    MBeanOperationInfo op;
    StringBuffer buffer = new StringBuffer();

    for ( int i = 0; i < names.length; i++ ) {
      ops = getMBeanServer().getMBeanInfo( names[i] ).getOperations();
      for ( int j = 0; j < ops.length; j++ ) {
        op = ops[j];
        if ( op.getName().toLowerCase().contains( query.toLowerCase() ) ) {
          buffer.append( getMBeanInfoString( names[i] ) )
              .append( " " ).append( getMethodInfoString( op ) )
              .append( "\n" );

        }
View Full Code Here


  }

  private int getHits( ObjectName[] names )
      throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException {
    MBeanOperationInfo[] ops;
    MBeanOperationInfo op;
    int hits = 0;
    for ( int i = 0; i < names.length; i++ ) {
      ops = getMBeanServer().getMBeanInfo( names[i] ).getOperations();
      for ( int j = 0; j < ops.length; j++ ) {
        op = ops[j];
        if ( op.getName().toLowerCase().contains( query.toLowerCase() ) ) {
          hits++;
        }
      }
    }
    closeServer();
View Full Code Here

      MBeanOp inputOp = new MBeanOp(opName, opArgs.size());
      MBeanOp matchOp = null;
      ArrayList opList = new ArrayList();
      for (int i = 0; i < ops.length; i++)
      {
         MBeanOperationInfo opInfo = ops[i];
         MBeanOp op = new MBeanOp(opInfo.getName(), opInfo.getSignature());
         if (inputOp.equals(op) == true)
         {
            matchOp = op;
            break;
         }
View Full Code Here

      out.println("+++ Operations:");
      length = opInfo != null ? opInfo.length : 0;
      for(int n = 0; n < length; n ++)
      {
         MBeanOperationInfo info = opInfo[n];
         out.print(' ');
         out.print(info.getReturnType());
         out.print(' ');
         out.print(info.getName());
         out.print('(');
         MBeanParameterInfo[] sig = info.getSignature();
         for(int s = 0; s < sig.length; s ++)
         {
            out.print(sig[s].getType());
            out.print(' ');
            out.print(sig[s].getName());
View Full Code Here

   @Override
   protected MBeanOperationInfo[] getInternalOperationInfo()
   {
      MBeanOperationInfo[] operations = new MBeanOperationInfo[1];
      MBeanParameterInfo[] getMCFAttributeParamInfo = new MBeanParameterInfo[]{ new MBeanParameterInfo("ManagedConnectionFactoryAttributeName", String.class.getName(), "The ManagedConnectionFactoryAttribute name")};
      operations[0] = new MBeanOperationInfo("getManagedConnectionFactoryAttribute", "Inspect the value of a ManagedConnectionFactory attribute", getMCFAttributeParamInfo, Object.class.getName(), MBeanOperationInfo.INFO);
      return operations;
     
   }
View Full Code Here

      MBeanParameterInfo[] createActivationSpecParams = new MBeanParameterInfo[]
      {
         new MBeanParameterInfo("MessagingType", Class.class.getName(), "The type of the message listener"),
         new MBeanParameterInfo("ActivationConfig", Collection.class.getName(), "A collection of activation config properties")
      };
      ops[0] = new MBeanOperationInfo("createActivationSpec", "Create an activation spec",
            createActivationSpecParams, ActivationSpec.class.getName(), MBeanOperationInfo.ACTION);

      MBeanParameterInfo[] activationParams = new MBeanParameterInfo[]
      {
         new MBeanParameterInfo("MessageEndpointFactory", MessageEndpointFactory.class.getName(), "The message endpoint factory"),
         new MBeanParameterInfo("ActivationSpec", ActivationSpec.class.getName(), "The activation spec")
      };
      ops[1] = new MBeanOperationInfo("endpointActivation", "Active the endpoint",
            activationParams, Void.class.getName(), MBeanOperationInfo.ACTION);
      ops[2] = new MBeanOperationInfo("endpointDeactivation", "Deactive the endpoint",
            activationParams, Void.class.getName(), MBeanOperationInfo.ACTION);

      return ops;
   }
View Full Code Here

      // operations
      if (ops.length > 0)
      {
         for (int i = 0; i < ops.length; i++)
         {
            MBeanOperationInfo opInfo = ops[i];
            // nobody uses opInfo.getImpact()
            out.println("   <operation>");
            out.println("      <description>" + opInfo.getDescription() + "</description>");
            out.println("      <name>" + opInfo.getName() + "</name>");
            outputParameters(out, opInfo.getSignature());           
            out.println("      <return-type>" + opInfo.getReturnType() + "</return-type>");
            out.println("   </operation>");
         }
         out.println();
      }
     
View Full Code Here

      }
      catch(Exception e)
      {
      }
      MBeanOperationInfo[] opInfo = {
         new MBeanOperationInfo("Access the LoginConfiguration", getConfiguration)
      };
      MBeanInfo info = new MBeanInfo(c.getName(), "Default JAAS LoginConfig",
         attrInfo, ctorInfo, opInfo, null);
      return info;
   }
View Full Code Here

               {
                  writeAttr.put (name, meth);
               }
               else
               {
                  ops.add(new MBeanOperationInfo
                     (
                     "Method " + name + " from class/interface " + clazz.getName(), meth
                     )
                  );
View Full Code Here

      {
         this.objectName = objectName;

         for (int op = 0; op < opInfo.length; op++)
         {
            MBeanOperationInfo info = opInfo[op];
            String name = info.getName();

            if (name.equals(JBOSS_INTERNAL_LIFECYCLE))
            {
               hasJBossInternalLifecycle = true;
               continue;
            }

            Integer opID = serviceOpMap.get(name);
            if (opID == null)
            {
               continue;
            }

            // Validate that is a no-arg void return type method
            if (info.getReturnType().equals("void") == false)
            {
               continue;
            }
            if (info.getSignature().length != 0)
            {
               continue;
            }

            hasOp[opID.intValue()] = true;
View Full Code Here

TOP

Related Classes of javax.management.MBeanOperationInfo

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.