tigase.xmpp
Interface XMPPImplIfc

All Superinterfaces:
Comparable<XMPPImplIfc>
All Known Subinterfaces:
XMPPPacketFilterIfc, XMPPPostprocessorIfc, XMPPPreprocessorIfc, XMPPProcessorIfc, XMPPStopListenerIfc
All Known Implementing Classes:
BindResource, DomainFilter, IBB, JabberIqAuth, JabberIqCommand, JabberIqIq, JabberIqOOB, JabberIqPrivacy, JabberIqPrivate, JabberIqRegister, JabberIqRoster, JabberIqSi, JabberIqSocks5Bytestreams, JabberIqStats, JabberIqVersion, Jingle, LastActivity, Message, MessageAll, MessageAmp, MessageArchive, MessageForwarding, MobileV1, MobileV2, OfflineMessages, PepPlugin, Presence, RosterPresence, SaslAuth, ServiceDiscovery, SessionBind, SimpleForwarder, StartTLS, StartZLib, UrnXmppPing, VCardTemp, XMPPProcessor, XMPPProcessorAbstract

public interface XMPPImplIfc
extends Comparable<XMPPImplIfc>

This is a base interface for all session manager plugins. There are packet processing plugins, preprocesing, postprocessing and packet filters. They all have a common basic methods which are defined here. Created: Sat Oct 14 16:11:22 2006

Version:
$Rev: 2996 $
Author:
Artur Hefczyc

Field Summary
static String CLIENT_XMLNS
           
 
Method Summary
 int concurrentQueuesNo()
           
 int concurrentThreadsPerQueue()
          Deprecated. 
 void getStatistics(StatisticsList list)
          The method allows to retrieve plugin own statistics if it generates any.
 String id()
          Method id returns a unique ID of the plugin.
 void init(Map<String,Object> settings)
          Method init is called just after the plugin has been loaded into memory.
 boolean isSupporting(String elem, String ns)
          Method isSupporting takes element name and namespace for this element and determines whether this element can be processed by this plugin.
 tigase.xml.Element[] supDiscoFeatures(XMPPResourceConnection session)
          Method supDiscoFeatures returns an array of XML Elements with service discovery features which have to be returned to the client uppon request.
 String[] supElements()
          Method supElements returns an array of element names for stanzas which can be processed by this plugin.
 String[] supNamespaces()
          Method supNamespaces returns an array of namespaces for stanzas which can be processed by this pluing.
 tigase.xml.Element[] supStreamFeatures(XMPPResourceConnection session)
          Method supStreamFeatures returns an array of XML Elements with stream features which have to be returned to the client uppon request.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

CLIENT_XMLNS

static final String CLIENT_XMLNS
See Also:
Constant Field Values
Method Detail

concurrentQueuesNo

int concurrentQueuesNo()

concurrentThreadsPerQueue

@Deprecated
int concurrentThreadsPerQueue()
Deprecated. 


id

String id()
Method 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.

Returns:
a String value

init

void init(Map<String,Object> settings)
          throws TigaseDBException
Method init is called just after the plugin has been loaded into memory. The idea behind this is to allow it to initialize or check the database. This might be especially useful for plugins which want to have a database access via non-standard stored procedures or need schema upgrade.

Parameters:
settings - is a Map with initial processor settings from the configuration file.
Throws:
TigaseDBException

isSupporting

boolean isSupporting(String elem,
                     String ns)
Method isSupporting takes element name and namespace for this element and determines whether this element can be processed by this plugin.

Parameters:
elem - a String value
ns - a String value
Returns:
a boolean value

supDiscoFeatures

tigase.xml.Element[] supDiscoFeatures(XMPPResourceConnection session)
Method supDiscoFeatures returns an array of XML Elements 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.

Parameters:
session - a XMPPResourceConnection value
Returns:
an Element[] value

supElements

String[] supElements()
Method supElements returns an array of element names for stanzas which can be processed by this plugin. Each element name corresponds to XMLNS returned in array by supNamespaces() method.

Returns:
a String[] value

supNamespaces

String[] supNamespaces()
Method supNamespaces returns an array of namespaces for stanzas which can be processed by this pluing. Each namespace corresponds to element name returned in array by supElemenets() method.

Returns:
a String[] value

supStreamFeatures

tigase.xml.Element[] supStreamFeatures(XMPPResourceConnection session)
Method supStreamFeatures returns an array of XML Elements 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.

Parameters:
session - a XMPPResourceConnection value
Returns:
an Element[] value

getStatistics

void getStatistics(StatisticsList list)
The method allows to retrieve plugin own statistics if it generates any.

Parameters:
list - is a statistics collection to which plugins own metrics can be added.


Copyright © 2012 Tigase. All Rights Reserved.