Package com.jitlogic.zorka.core.mbeans

Examples of com.jitlogic.zorka.core.mbeans.AttrGetter


    public Map<String, Object> process(Map<String, Object> record) {
        SpyContext ctx = (SpyContext) record.get(".CTX");
        String mbeanName = ctx.subst(mbeanTemplate);
        String attrName = ctx.subst(attrTemplate);

        Object obj1 = new AttrGetter(record.get(srcField), attrChain);
        Object obj2 = registry.getOrRegister(mbsName, mbeanName, attrName, obj1, desc);

        if (!obj1.equals(obj2)) {
            log.warn(ZorkaLogger.ZSP_ERRORS, "Attribute '" + attrName + "' of '" + mbeanName + "' is already used.");
        }

        return record;
    }
View Full Code Here


  }
 
 
  @Test
  public void testMapGetterAttr() throws Exception {
    bean.put("test", new AttrGetter(this, "class"));
    assertSame(this.getClass(), bean.getAttribute("test"));
  }
View Full Code Here

  }
 
 
  @Test
  public void testMapGetterMultiAttr() throws Exception {
    bean.put("test", new AttrGetter(this, "class", "name", "length"));
   
  }
View Full Code Here

                    });

        }

        registry.getOrRegister("java", mbeanName, "SymbolsCreated",
                new AttrGetter(getSymbolRegistry(), "size()"));

        registry.getOrRegister("java", mbeanName, "stats", stats);
    }
View Full Code Here

     * @param obj
     * @param attrs
     * @return
     */
    public ValGetter getter(Object obj, Object... attrs) {
        return new AttrGetter(obj, attrs);
    }
View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.core.mbeans.AttrGetter

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.