public abstract class AbstractStanzaModule<T extends Stanza> extends Object implements XmppModule, InitializingModule, ContextAware
| Modifier and Type | Field and Description |
|---|---|
protected Context |
context |
protected Logger |
log |
| Constructor and Description |
|---|
AbstractStanzaModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterRegister()
Called when module is registered.
|
void |
beforeRegister()
Called just before registration module in XmppModulesManager
.
|
void |
beforeUnregister()
Called when module is unregistered.
|
protected void |
fireEvent(Event<?> event) |
protected static Element |
getFirstChild(Element element,
String elementName) |
void |
process(Element element)
Main method of module.
|
abstract void |
process(T stanza)
Method for processing incoming stanza.
|
void |
setContext(Context context) |
protected void |
write(Element stanza) |
protected void |
write(Element stanza,
AsyncCallback asyncCallback) |
protected void |
write(Element stanza,
Long timeout,
AsyncCallback asyncCallback) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCriteria, getFeaturesprotected static Element getFirstChild(Element element, String elementName) throws XMLException
XMLExceptionpublic void afterRegister()
InitializingModuleafterRegister in interface InitializingModulepublic void beforeRegister()
InitializingModulebeforeRegister in interface InitializingModulepublic void beforeUnregister()
InitializingModulebeforeUnregister in interface InitializingModuleprotected void fireEvent(Event<?> event)
public void process(Element element) throws JaxmppException
XmppModuleprocess in interface XmppModuleelement - incoming XMPP stanzaJaxmppExceptionpublic abstract void process(T stanza) throws JaxmppException
element - incoming stanzaJaxmppExceptionpublic void setContext(Context context)
setContext in interface ContextAwareprotected void write(Element stanza) throws JaxmppException
JaxmppExceptionprotected void write(Element stanza, AsyncCallback asyncCallback) throws JaxmppException
JaxmppExceptionprotected void write(Element stanza, Long timeout, AsyncCallback asyncCallback) throws JaxmppException
JaxmppExceptionCopyright © 2006–2016 Tigase. All rights reserved.