public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException { // locally managed attributes! // if("State".equals(attribute)) { return Integer.valueOf(getState()); } if("StateString".equals(attribute)) { return getStateString(); } if("Name".equals(attribute)) { return getName(); } // Wrapped attributes? // return getInternalAttribute (attribute); }
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException { setInternalAttribute (attribute); }
public AttributeList getAttributes(String[] attributes) { AttributeList list = new AttributeList(); if (attributes == null) return list; for (int i = 0; i < attributes.length; ++i) { try { Object value = getAttribute(attributes[i]); list.add(new Attribute(attributes[i], value)); } catch (Throwable t) { log.debug("Error getting attribute " + attributes[i], t); } } return list; }
jbossInternalLifecycle((String) params[0]); return null; create(); return null; start(); return null; stop(); return null; destroy(); return null; return internalInvoke (actionName, params, signature);
MBeanConstructorInfo[] ctorInfo = getInternalConstructorInfo(); MBeanAttributeInfo[] attrs = getInternalAttributeInfo(); MBeanAttributeInfo[] attrInfo = new MBeanAttributeInfo[3 + attrs.length]; attrInfo[0] = new MBeanAttributeInfo("Name", jbossInternalLifecycleParms[0] = new MBeanParameterInfo("method", String.class.getName(), "The lifecycle method"); MBeanOperationInfo[] ops = getInternalOperationInfo(); MBeanOperationInfo[] opInfo = new MBeanOperationInfo[5 + ops.length]; opInfo[0] = new MBeanOperationInfo("create", MBeanNotificationInfo[] notifyInfo = getInternalNotificationInfo(); return new MBeanInfo(getClass().getName(), getInternalDescription(), attrInfo, ctorInfo,
@Override protected Object internalInvoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException { if(actionName.equals("getManagedConnectionFactoryAttribute")) { String param = (String)params[0]; return getManagedConnectionFactoryAttribute(param); } else { return super.internalInvoke(actionName, params, signature); } }
return property; return super.getInternalAttribute(attribute);
jbossInternalLifecycle((String) params[0]); return null; create(); return null; start(); return null; stop(); return null; destroy(); return null; return internalInvoke (actionName, params, signature);
MBeanConstructorInfo[] ctorInfo = getInternalConstructorInfo(); MBeanAttributeInfo[] attrs = getInternalAttributeInfo(); MBeanAttributeInfo[] attrInfo = new MBeanAttributeInfo[3 + attrs.length]; attrInfo[0] = new MBeanAttributeInfo("Name", jbossInternalLifecycleParms[0] = new MBeanParameterInfo("method", String.class.getName(), "The lifecycle method"); MBeanOperationInfo[] ops = getInternalOperationInfo(); MBeanOperationInfo[] opInfo = new MBeanOperationInfo[5 + ops.length]; opInfo[0] = new MBeanOperationInfo("create", MBeanNotificationInfo[] notifyInfo = getInternalNotificationInfo(); return new MBeanInfo(getClass().getName(), getInternalDescription(), attrInfo, ctorInfo,
return null; return super.internalInvoke(actionName, params, signature);
result = super.getInternalAttribute(attribute);
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException { // locally managed attributes! // if("State".equals(attribute)) { return new Integer(getState()); } if("StateString".equals(attribute)) { return getStateString(); } if("Name".equals(attribute)) { return getName(); } // Wrapped attributes? // return getInternalAttribute (attribute); }
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException { setInternalAttribute (attribute); }
public AttributeList getAttributes(String[] attributes) { AttributeList list = new AttributeList(); if (attributes == null) return list; for (int i = 0; i < attributes.length; ++i) { try { Object value = getAttribute(attributes[i]); list.add(new Attribute(attributes[i], value)); } catch (Throwable t) { log.debugf(t, "Error getting attribute %1s", attributes[i]); } } return list; }
protected void setInternalAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException { String name = attribute.getName(); if ("WorkManager".equals(name)) this.workManager = (WorkManager) attribute.getValue(); else if ("XATerminator".equals(name)) this.xaTerminator = (XATerminator) attribute.getValue(); else super.setInternalAttribute(attribute); }