Package tigase.xmpp.impl.annotation
Class AnnotatedXMPPProcessor
java.lang.Object
tigase.xmpp.XMPPProcessor
tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor
- All Implemented Interfaces:
Comparable<XMPPImplIfc>,XMPPImplIfc,XMPPProcessorConcurrencyAwareIfc
- Direct Known Subclasses:
AbstractPushNotifications,ClientStateIndication,ErrorCounter,ExternalServiceDiscoveryProcessor,LastActivityAbstract,Message,MIXProcessor,MobileV3,MotdProcessor,PresenceAbstract,PushPresence,ServerInfo,SessionBind,XMPPProcessorAbstract
This class is extension of
XMPPProcessor which 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, cmpInfoFields inherited from interface tigase.xmpp.XMPPImplIfc
CLIENT_XMLNS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionid()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.String[][]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.String[]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.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
-
Constructor Details
-
AnnotatedXMPPProcessor
protected AnnotatedXMPPProcessor()
-
-
Method Details
-
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
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
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
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
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
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.
-