Package tigase.xmpp.impl.annotation
Class AnnotatedXMPPProcessor
- java.lang.Object
-
- tigase.xmpp.XMPPProcessor
-
- tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor
-
- All Implemented Interfaces:
java.lang.Comparable<XMPPImplIfc>,XMPPImplIfc,XMPPProcessorConcurrencyAwareIfc
- Direct Known Subclasses:
AbstractPushNotifications,ClientStateIndication,ErrorCounter,ExternalServiceDiscoveryProcessor,LastActivityAbstract,Message,MIXProcessor,MobileV3,MotdProcessor,PresenceAbstract,SessionBind,XMPPProcessorAbstract
public abstract class AnnotatedXMPPProcessor extends XMPPProcessor
This class is extension ofXMPPProcessorwhich provides support for defining processor Id, supported paths and XMLNSs and more using annotations- Author:
- andrzej
-
-
Field Summary
-
Fields inherited from class tigase.xmpp.XMPPProcessor
ALL_NAMES, ALL_PATHS, cmpInfo
-
Fields inherited from interface tigase.xmpp.XMPPImplIfc
CLIENT_XMLNS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAnnotatedXMPPProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringid()Methodidreturns a unique ID of the plugin.Element[]supDiscoFeatures(XMPPResourceConnection session)MethodsupDiscoFeaturesreturns an array of XMLElements with service discovery features which have to be returned to the client uppon request.java.lang.String[][]supElementNamePaths()MethodsupElementNamePathsreturns an array of element names in form of a full path to the XML element for stanzas which can be processed by this plugin.java.lang.String[]supNamespaces()MethodsupNamespacesreturns an array of name-spaces for stanzas which can be processed by this plugin.Element[]supStreamFeatures(XMPPResourceConnection session)MethodsupStreamFeaturesreturns an array of XMLElements with stream features which have to be returned to the client uppon request.java.util.Set<StanzaType>supTypes()Method returns an array of all stanza types which the plugin is able to handle.-
Methods inherited from class tigase.xmpp.XMPPProcessor
canHandle, compareTo, concurrentQueuesNo, getComponentInfo, getInstance, getQueueSize, getStatistics, getThreadsNo, init, toString
-
-
-
-
Method Detail
-
id
public java.lang.String id()
Description copied from interface:XMPPImplIfcMethodidreturns a unique ID of the plugin. Each plugin has own, unique ID which is used in the configuration file to determine whether it needs to be loaded or not. In most cases the ID can be equal to XMLNS of the packages processed by the plugin.- Returns:
- a
Stringvalue
-
supElementNamePaths
public java.lang.String[][] supElementNamePaths()
Description copied from interface:XMPPImplIfcMethodsupElementNamePathsreturns an array of element names in form of a full path to the XML element for stanzas which can be processed by this plugin. Each element name path corresponds to XMLNS returned in array bysupNamespaces()method. The element path itself is represented by a String array with each path element as a separate String.- Specified by:
supElementNamePathsin interfaceXMPPImplIfc- Overrides:
supElementNamePathsin classXMPPProcessor- Returns:
- a
String[][]value is an array for element paths for which the plugin offers processing capabilities. Each path is in form of a String array in order to reduce parsing overhead.
-
supNamespaces
public java.lang.String[] supNamespaces()
Description copied from interface:XMPPImplIfcMethodsupNamespacesreturns an array of name-spaces for stanzas which can be processed by this plugin. Each namespace corresponds to element name returned in array bysupElemenets()method.- Specified by:
supNamespacesin interfaceXMPPImplIfc- Overrides:
supNamespacesin classXMPPProcessor- Returns:
- a
String[]value
-
supDiscoFeatures
public Element[] supDiscoFeatures(XMPPResourceConnection session)
Description copied from interface:XMPPImplIfcMethodsupDiscoFeaturesreturns an array of XMLElements with service discovery features which have to be returned to the client uppon request. Service discovery features returned by this method correspond to services supported by this plugin.- Specified by:
supDiscoFeaturesin interfaceXMPPImplIfc- Overrides:
supDiscoFeaturesin classXMPPProcessor- Parameters:
session- aXMPPResourceConnectionvalue- Returns:
- an
Element[]value
-
supStreamFeatures
public Element[] supStreamFeatures(XMPPResourceConnection session)
Description copied from interface:XMPPImplIfcMethodsupStreamFeaturesreturns an array of XMLElements with stream features which have to be returned to the client uppon request. Stream features returned by this method correspond to features supported by this plugin.- Specified by:
supStreamFeaturesin interfaceXMPPImplIfc- Overrides:
supStreamFeaturesin classXMPPProcessor- Parameters:
session- aXMPPResourceConnectionvalue- Returns:
- an
Element[]value
-
supTypes
public java.util.Set<StanzaType> supTypes()
Description copied from interface:XMPPImplIfcMethod returns an array of all stanza types which the plugin is able to handle. If the method returns NULL, then all stanzas of all types will be passed to the plugin for processing. Otherwise only stanzas with selected types, assuming that element names and name-spaces match as well.- Specified by:
supTypesin interfaceXMPPImplIfc- Overrides:
supTypesin classXMPPProcessor- Returns:
- a
StanzaType[]array of supported stanza types.
-
-