Package javax.management

Examples of javax.management.MBeanInfo$ArrayGettersSafeAction


         Set objectNames = server.queryNames(filterName, null);
         Iterator objectNamesIter = objectNames.iterator();
         while( objectNamesIter.hasNext() )
         {
            ObjectName name = (ObjectName) objectNamesIter.next();
            MBeanInfo info = server.getMBeanInfo(name);
            String domainName = name.getDomain();
            MBeanData mbeanData = new MBeanData(name, info);
            DomainData data = (DomainData) domainData.get(domainName);
            if( data == null )
            {
View Full Code Here


   public static MBeanData getMBeanData(String name) throws JMException
   {
      MBeanServer server = getMBeanServer();
      ObjectName objName = new ObjectName(name);
      MBeanInfo info = server.getMBeanInfo(objName);
      MBeanData mbeanData = new MBeanData(objName, info);
      return mbeanData;
   }
View Full Code Here

   public static AttributeList setAttributes(String name, HashMap attributes) throws JMException
   {
      MBeanServer server = getMBeanServer();
      ObjectName objName = new ObjectName(name);
      MBeanInfo info = server.getMBeanInfo(objName);
      MBeanAttributeInfo[] attributesInfo = info.getAttributes();
      AttributeList newAttributes = new AttributeList();
      for(int a = 0; a < attributesInfo.length; a ++)
      {
         MBeanAttributeInfo attrInfo = attributesInfo[a];
         String attrName = attrInfo.getName();
View Full Code Here

   public static OpResultInfo invokeOp(String name, int index, String[] args) throws JMException
   {
      MBeanServer server = getMBeanServer();
      ObjectName objName = new ObjectName(name);
      MBeanInfo info = server.getMBeanInfo(objName);
      MBeanOperationInfo[] opInfo = info.getOperations();
      MBeanOperationInfo op = opInfo[index];
      MBeanParameterInfo[] paramInfo = op.getSignature();
      String[] argTypes = new String[paramInfo.length];
      for(int p = 0; p < paramInfo.length; p ++)
         argTypes[p] = paramInfo[p].getType();
View Full Code Here

      Element mbeanElement, List<ObjectName> mbeans)
      throws Exception
   {
      // Set configuration to MBeans from XML

      MBeanInfo info;
      try
      {
         info = server.getMBeanInfo(objectName);
      }
      catch (InstanceNotFoundException e)
      {
         // The MBean is no longer available
         throw new DeploymentException("trying to configure nonexistent mbean: " + objectName);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not get mbeanInfo", JMXExceptionDecoder.decode(e));
      } // end of catch

      if (info == null)
      {
         throw new DeploymentException("MBeanInfo is null for mbean: " + objectName);
      } // end of if ()

      // Get the classloader for loading attribute classes.
      ClassLoader cl = server.getClassLoader(loaderName);
      // Initialize the mbean using the configuration supplied defaults
      MBeanAttributeInfo[] attributes = info.getAttributes();
      HashMap<String, MBeanAttributeInfo> attributeMap = new HashMap<String, MBeanAttributeInfo>();
      for (int i = 0; i < attributes.length; i++)
      {
         MBeanAttributeInfo attr = attributes[i];
         attributeMap.put(attr.getName(), attr);
View Full Code Here

      throws Exception
   {
      Element mbeanElement = doc.createElement("mbean");
      mbeanElement.setAttribute("name", name.toString());

      MBeanInfo info = server.getMBeanInfo(name);
      mbeanElement.setAttribute("code", info.getClassName());
      MBeanAttributeInfo[] attributes = info.getAttributes();
      boolean trace = log.isTraceEnabled();
      for (int i = 0; i < attributes.length; i++)
      {
         if (trace)
            log.trace("considering attribute: " + attributes[i]);
View Full Code Here

    */
   public MBeanInfo getMBeanInfo(ObjectName name)
      throws InstanceNotFoundException, IntrospectionException,
      ReflectionException
   {
      MBeanInfo info = null;
      try
      {
         info = getServer(name).getMBeanInfo(name);
      }
      catch(InstanceNotFoundException e)
View Full Code Here

         return;
      }

      log.debug("Begin Report Object: " + mbean);
      reportedNames.add(mbean);
      MBeanInfo mbeanInfo = jsr77EJB.getMBeanInfo(mbean);
      MBeanAttributeInfo[] attrInfo = mbeanInfo.getAttributes();
      String[] attrNames = new String[attrInfo.length];
      // First just report all attribute names and types
      for (int i = 0; i < attrInfo.length; i++)
      {
         String name = attrInfo[i].getName();
View Full Code Here

      MBeanOperationInfo[] opInfo = {
         new MBeanOperationInfo("invoke", "The detached invoker entry point",
            sig, "java.lang.Object", MBeanOperationInfo.ACTION)
      };
      MBeanNotificationInfo[] eventInfo = null;
      this.info = new MBeanInfo(getClass().getName(),
         "A wrapper inovker that delegates to the target invoker",
         attrInfo,
         ctorInfo,
         opInfo,
         eventInfo);
View Full Code Here

{  
   public Object filter(MarshalledInvocation input, Object result) throws Throwable
   {
      if ("getMBeanInfo".equals(input.getMethod().getName()) && (result instanceof ModelMBeanInfo))
      {
         MBeanInfo info = (MBeanInfo)result;

         result = new MBeanInfo(
               info.getClassName(),
               info.getDescription(),
               deepCopy(info.getAttributes()), // Strip the Descriptors
               info.getConstructors(),
               info.getOperations(),
               info.getNotifications());
      }
      return result;
   }
View Full Code Here

TOP

Related Classes of javax.management.MBeanInfo$ArrayGettersSafeAction

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.