public void notify(String topic, Object msg) {
notify(null, topic, msg);
}
public void notify(Referencable publisher, String topic, Object msg) {
Notify notify = new Notify();
NotificationMessageHolderType holder = new NotificationMessageHolderType();
if (publisher != null) {
holder.setProducerReference(publisher.getEpr());
}
if (topic != null) {
TopicExpressionType topicExp = new TopicExpressionType();
topicExp.getContent().add(topic);
holder.setTopic(topicExp);
}
holder.setMessage(new NotificationMessageHolderType.Message());
holder.getMessage().setAny(msg);
notify.getNotificationMessage().add(holder);
broker.notify(notify);
}