public class SchedulesXML extends RBEConfigObjectXML
SchedulesXML
provides methods for accessing XML representation of a
Schedules
.
A SchedulesXML object is used when sending Schedules to or receiving from
a TIBCO Hawk Agent within an application written using Console API.
For example the following code fragment shows how to get a Schedules from an agent:
MicroAgent maidRepo = getRulebaseMicroagentID(); MethodInvocation mi = new MethodInvocation("getSchedules", null); MicroAgentData mad = agentManager.invoke( maidRepo, mi ); Object o = mad.getData(); if (o instanceof SchedulesXML) { SchedulesXML rbXMLs = (SchedulesXML)mad.getData(); // return the retrieved Schedules return new Schedules(rbXMLs.getXMLReader()); } // if error occurred on the agent, the returned object will be a MicroAgentException else if (o instanceof MicroAgentException) throw (MicroAgentException)o;
and, to send a Schedules to an agent:
Schedules schedules = getSchedules(); MicroAgent maidRepo = getRepositoryMicroagentID(); DataElement[] dataElements = new DataElement[2]; dataElements[0] = new DataElement("SchedulesXML", new SchedulesXML(schedules)); dataElements[1] = new DataElement("Notify" , new Boolean(false)); MethodInvocation mi = new MethodInvocation("setSchedules", dataElements); MicroAgentData mad = agentManager.invoke( maidRepo, mi );
For a complete list of methods in RepositoryMicroagent, refer to TIBCO Hawk Console API Method's Reference For a complete sample for retrieving and sending a Schedules, see the Schedule API samples in TIBCO Hawk installation samples.
Constructor and Description |
---|
SchedulesXML(Schedules schedules)
Creates a schedules XML wrapper from the specified Schedules.
|
getXMLReader, getXMLString
public SchedulesXML(Schedules schedules)
Copyright © 2000-2019 TIBCO Inc. All Rights Reserved.