System.out.println("WorkItem type: " + wi.getType());
if (wi.getType() == AGENT_ADDED)
{
AgentAddedWorkItem item = (AgentAddedWorkItem)wi;
Agent agent = item.getAgent();
// If this is the gizmo Agent we notify the main thread so processing can continue.
if (agent.getProduct().equals("gizmo"))
{
synchronized(this)
{
_gizmo = agent;
notify();
}
}
}
if (wi.getType() == AGENT_HEARTBEAT)
{
AgentHeartbeatWorkItem item = (AgentHeartbeatWorkItem)wi;
Agent agent = item.getAgent();
System.out.println(agent.getName());
}
if (wi.getType() == EVENT_RECEIVED)
{
EventReceivedWorkItem item = (EventReceivedWorkItem)wi;
Agent agent = item.getAgent();
QmfEvent event = item.getEvent();
String className = event.getSchemaClassId().getClassName();
System.out.println("Event: " + className);
//event.listValues();