@Bean(name="publisher", active=true) public class EventPublisherModule extends AbstractEventBusModule implements Initializable, UnregisterAware
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
eventBus, log, writerEMPTY_FEATURES| Constructor and Description |
|---|
EventPublisherModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeUnregister()
Method called before bean unregister.
|
String[] |
getFeatures()
Returns XMPP features offered by module.
|
Criteria |
getModuleCriteria()
Returns critera used by Component to select module to handle incoming stanza.
|
protected Collection<Subscription> |
getSubscribers(String packageName,
String eventName,
Object event) |
void |
initialize()
Method will be called, when bean will be created, configured and ready to use.
|
void |
process(Packet packet)
Process incoming stanza.
|
void |
publishEvent(Element event) |
void |
publishEvent(String eventPackage,
String name,
Element event,
Collection<Subscription> subscribers) |
void |
publishObjectEvent(Object event) |
isClusteredEventBus, nextStanzaIDfireEvent, getEventBus, getWriter, setEventBus, setWriter, write, writepublic static final String ID
public void beforeUnregister()
UnregisterAwarebeforeUnregister in interface UnregisterAwarepublic String[] getFeatures()
ModulegetFeatures in interface Modulenull.public Criteria getModuleCriteria()
ModulegetModuleCriteria in interface Modulepublic void initialize()
Initializableinitialize in interface Initializablepublic void process(Packet packet) throws ComponentException, TigaseStringprepException
Moduleprocess in interface Modulepacket - received stanza.ComponentException - if stanza can't be processed correctly. ComponentException is converted to error
stanza and returned to stanza sender.TigaseStringprepException - if there was an error during stringprep processing.public void publishEvent(Element event)
public void publishEvent(String eventPackage, String name, Element event, Collection<Subscription> subscribers)
public void publishObjectEvent(Object event)
protected Collection<Subscription> getSubscribers(String packageName, String eventName, Object event)
Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.