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 ofXMPPProcessor
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, cmpInfo
-
Fields inherited from interface tigase.xmpp.XMPPImplIfc
CLIENT_XMLNS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AnnotatedXMPPProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
id()
Methodid
returns a unique ID of the plugin.Element[]
supDiscoFeatures(XMPPResourceConnection session)
MethodsupDiscoFeatures
returns an array of XMLElement
s with service discovery features which have to be returned to the client uppon request.java.lang.String[][]
supElementNamePaths()
MethodsupElementNamePaths
returns 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()
MethodsupNamespaces
returns an array of name-spaces for stanzas which can be processed by this plugin.Element[]
supStreamFeatures(XMPPResourceConnection session)
MethodsupStreamFeatures
returns an array of XMLElement
s 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:XMPPImplIfc
Methodid
returns 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
String
value
-
supElementNamePaths
public java.lang.String[][] supElementNamePaths()
Description copied from interface:XMPPImplIfc
MethodsupElementNamePaths
returns 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:
supElementNamePaths
in interfaceXMPPImplIfc
- Overrides:
supElementNamePaths
in 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:XMPPImplIfc
MethodsupNamespaces
returns 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:
supNamespaces
in interfaceXMPPImplIfc
- Overrides:
supNamespaces
in classXMPPProcessor
- Returns:
- a
String[]
value
-
supDiscoFeatures
public Element[] supDiscoFeatures(XMPPResourceConnection session)
Description copied from interface:XMPPImplIfc
MethodsupDiscoFeatures
returns an array of XMLElement
s 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:
supDiscoFeatures
in interfaceXMPPImplIfc
- Overrides:
supDiscoFeatures
in classXMPPProcessor
- Parameters:
session
- aXMPPResourceConnection
value- Returns:
- an
Element[]
value
-
supStreamFeatures
public Element[] supStreamFeatures(XMPPResourceConnection session)
Description copied from interface:XMPPImplIfc
MethodsupStreamFeatures
returns an array of XMLElement
s 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:
supStreamFeatures
in interfaceXMPPImplIfc
- Overrides:
supStreamFeatures
in classXMPPProcessor
- Parameters:
session
- aXMPPResourceConnection
value- Returns:
- an
Element[]
value
-
supTypes
public java.util.Set<StanzaType> supTypes()
Description copied from interface:XMPPImplIfc
Method 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:
supTypes
in interfaceXMPPImplIfc
- Overrides:
supTypes
in classXMPPProcessor
- Returns:
- a
StanzaType[]
array of supported stanza types.
-
-