The only limitation for events are the requirements of name and xmlns. Internal structure may be defined by programmer.
Element event = new Element("EventName", new String[]{"xmlns"}, new String[]{"tigase:demo"}); event.addChild(new Element("sample_value", "1")); eventBus.fire(event);
This event will be received by all handlers that are registered for exactly this event, or all events using the tigase:demo namespace on all cluster nodes. It is possible to limit event delivery only to the current Tigase instance (current cluster
node), by setting the attribute local
:
Element event = new Element("EventName", new String[]{"xmlns", "local"}, new String[]{"tigase:demo", "true"}); event.addChild(new Element("sample_value", "1")); eventBus.fire(event);