Publishing an Event
After initializing the necessary event fields, your application can publish an event by calling the BrokerClient.publish method. The following example contains an excerpt from a sample application that shows the use of the BrokerClient.publishEvent method. This method accepts a BrokerEvent.
. . .
BrokerClient c;
BrokerEvent e;
. . .
try {
c.publish(e);
} catch (BrokerException ex) {
System.out.println("Error on publish\n"+ex);
return;
}
. . .