public abstract class AnnotatedXMPPProcessor extends XMPPProcessor
XMPPProcessor
which provides support for defining
processor Id, supported paths and XMLNSs and more using annotationsALL_NAMES, ALL_PATHS, cmpInfo
CLIENT_XMLNS
Modifier | Constructor and Description |
---|---|
protected |
AnnotatedXMPPProcessor() |
Modifier and Type | Method and Description |
---|---|
String |
id()
Method
id returns a unique ID of the plugin. |
Element[] |
supDiscoFeatures(XMPPResourceConnection session)
Method
supDiscoFeatures returns an array of XML Element s with service discovery
features which have to be returned to the client uppon request. |
String[][] |
supElementNamePaths()
Method
supElementNamePaths 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. |
String[] |
supNamespaces()
Method
supNamespaces returns an array of name-spaces for stanzas which can be processed by this
plugin. |
Element[] |
supStreamFeatures(XMPPResourceConnection session)
Method
supStreamFeatures returns an array of XML Element s with stream features which
have to be returned to the client uppon request. |
Set<StanzaType> |
supTypes()
Method returns an array of all stanza types which the plugin is able to handle.
|
canHandle, compareTo, concurrentQueuesNo, getComponentInfo, getInstance, getQueueSize, getStatistics, getThreadsNo, init, toString
public String id()
XMPPImplIfc
id
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.String
valuepublic String[][] supElementNamePaths()
XMPPImplIfc
supElementNamePaths
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 by supNamespaces()
method. The element path itself is represented by a String array with
each path element as a separate String.supElementNamePaths
in interface XMPPImplIfc
supElementNamePaths
in class XMPPProcessor
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.public String[] supNamespaces()
XMPPImplIfc
supNamespaces
returns an array of name-spaces for stanzas which can be processed by this
plugin. Each namespace corresponds to element name returned in array by supElemenets()
method.supNamespaces
in interface XMPPImplIfc
supNamespaces
in class XMPPProcessor
String[]
valuepublic Element[] supDiscoFeatures(XMPPResourceConnection session)
XMPPImplIfc
supDiscoFeatures
returns an array of XML Element
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.supDiscoFeatures
in interface XMPPImplIfc
supDiscoFeatures
in class XMPPProcessor
session
- a XMPPResourceConnection
valueElement[]
valuepublic Element[] supStreamFeatures(XMPPResourceConnection session)
XMPPImplIfc
supStreamFeatures
returns an array of XML Element
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.supStreamFeatures
in interface XMPPImplIfc
supStreamFeatures
in class XMPPProcessor
session
- a XMPPResourceConnection
valueElement[]
valuepublic Set<StanzaType> supTypes()
XMPPImplIfc
supTypes
in interface XMPPImplIfc
supTypes
in class XMPPProcessor
StanzaType[]
array of supported stanza types.Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.