// 1. create MonitorCommand
CommandMapper cm = CommandMapper.getInstance(instanceName);
MonitorSetCommand command = cm.mapSetCommand(dottedName, value); //throws InvalidDottedNameException
// 2. create correspondent MonitoringEvent
MonitoringEvent event = new MonitoringEvent(instanceName, dottedName, MonitoringEvent.SET_MONITOR_DATA, command);
// 3. send/receive event to instance
AdminEventResult result = AdminEventMulticaster.multicastEvent(event);
// 4. analyse the result
if(!result.getResultCode().equals(result.SUCCESS))
{
handleMonitoringError(result, instanceName, dottedName);
}
// 5. extract result list
AttributeList resultList = null;
AttributeList tmp = (AttributeList)result.getAttribute(event.getEffectiveDestination(), MonitorCommand.MONITOR_RESULT);
Iterator it = tmp.iterator();
while (it.hasNext())
{
Attribute attribute = (Attribute) it.next();
resultList = (AttributeList)attribute.getValue();