@Bean(name="subscribe", active=true) public class SubscribeModule extends AbstractEventBusModule implements Initializable, UnregisterAware
| Modifier and Type | Class and Description |
|---|---|
static class |
SubscribeModule.NewRemoteSubscriptionEvent |
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
eventBus, log, writerEMPTY_FEATURES| Constructor and Description |
|---|
SubscribeModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeUnregister()
Method called before bean unregister.
|
void |
clusterNodeConnected(JID node) |
void |
clusterNodeDisconnected(JID node) |
String[] |
getFeatures()
Returns XMPP features offered by module.
|
Criteria |
getModuleCriteria()
Returns critera used by Component to select module to handle incoming stanza.
|
void |
initialize()
Method will be called, when bean will be created, configured and ready to use.
|
protected void |
onAddHandler(String eventName,
String eventPackage) |
void |
process(Packet packet)
Process incoming stanza.
|
protected Element |
processClusterSubscription(Packet packet) |
protected Element |
processNonClusterSubscription(Packet packet) |
protected void |
sendSubscribeRequest(String to,
Collection<Element> subscriptionElements) |
isClusteredEventBus, nextStanzaIDfireEvent, getEventBus, getWriter, setEventBus, setWriter, write, writepublic static final String ID
public void beforeUnregister()
UnregisterAwarebeforeUnregister in interface UnregisterAwarepublic void clusterNodeConnected(JID node)
public void clusterNodeDisconnected(JID node)
public 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.protected Element processClusterSubscription(Packet packet) throws TigaseStringprepException
TigaseStringprepExceptionprotected Element processNonClusterSubscription(Packet packet) throws TigaseStringprepException, ComponentException
protected void sendSubscribeRequest(String to, Collection<Element> subscriptionElements)
Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.