tigase.jaxmpp.core.client.xmpp.modules.capabilities

## Class CapabilitiesModule

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.capabilities.CapabilitiesModule

- All Implemented Interfaces:
    ContextAware, InitializingModule, XmppModule

      public class CapabilitiesModule
      extends Object
      implements XmppModule, ContextAware, InitializingModule

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `charsetName`
    `static String` | `NODE_NAME_KEY`
    `static String` | `VERIFICATION_STRING_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CapabilitiesModule()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterRegister()` Called when module is registered.
    `void` | `beforeRegister()` Called just before registration module in XmppModulesManager .
    `void` | `beforeUnregister()` Called when module is unregistered.
    `String` | `generateVerificationString(String[] identities, String[] features)`
    `static String` | `generateVerificationString(String[] identities, String[] features, JabberDataElement extensions)`
    `CapabilitiesCache` | `getCache()`
    `Criteria` | `getCriteria()` Criteria
    `String[]` | `getFeatures()` Returns features what are implemented by Module.
    `protected String` | `getNodeName()`
    `protected boolean` | `isEnabled()`
    `protected void` | `onBeforePresenceSend(Presence presence)`
    `protected void` | `onReceivedPresence(Presence presence)`
    `void` | `process(Element element)` Main method of module.
    `void` | `setCache(CapabilitiesCache cache)`
    `void` | `setContext(Context context)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NODE_NAME_KEY

          public static final String NODE_NAME_KEY

      See Also:
        Constant Field Values

    - #### VERIFICATION_STRING_KEY

          public static final String VERIFICATION_STRING_KEY

      See Also:
        Constant Field Values

    - #### charsetName

          public static final String charsetName

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CapabilitiesModule

          public CapabilitiesModule()

  - ### Method Detail

    - #### generateVerificationString

          public static String generateVerificationString(String[] identities,
                                                          String[] features,
                                                          JabberDataElement extensions)

    - #### generateVerificationString

          public String generateVerificationString(String[] identities,
                                                   String[] features)

    - #### afterRegister

          public void afterRegister()

      Description copied from interface: `InitializingModule`
      Called when module is registered. At this moment module is formally registered and it is part of client.
      Specified by:
        `afterRegister` in interface `InitializingModule`

    - #### beforeRegister

          public void beforeRegister()

      Description copied from interface: `InitializingModule`
      Called just before registration module in XmppModulesManager . It is good place to check if module is initialized properly.
      Specified by:
        `beforeRegister` in interface `InitializingModule`

    - #### beforeUnregister

          public void beforeUnregister()

      Description copied from interface: `InitializingModule`
      Called when module is unregistered.
      Specified by:
        `beforeUnregister` in interface `InitializingModule`

    - #### getCache

          public CapabilitiesCache getCache()

    - #### setCache

          public void setCache(CapabilitiesCache cache)

    - #### getCriteria

          public Criteria getCriteria()

      Description copied from interface: `XmppModule`
      Criteria
      Specified by:
        `getCriteria` in interface `XmppModule`
      Returns:

    - #### getFeatures

          public String[] getFeatures()

      Description copied from interface: `XmppModule`

      Returns features what are implemented by Module.

      See Service Discovery Features

      Specified by:
        `getFeatures` in interface `XmppModule`
      Returns:
        array of features

    - #### process

          public void process(Element element)
                       throws JaxmppException

      Description copied from interface: `XmppModule`
      Main method of module. Module will process incoming stanza by call this method.
      Specified by:
        `process` in interface `XmppModule`
      Parameters:
        `element` - incoming XMPP stanza
      Throws:
        `JaxmppException`

    - #### setContext

          public void setContext(Context context)

      Specified by:
        `setContext` in interface `ContextAware`

    - #### getNodeName

          protected String getNodeName()

    - #### isEnabled

          protected boolean isEnabled()

    - #### onBeforePresenceSend

          protected void onBeforePresenceSend(Presence presence)
                                       throws XMLException

      Throws:
        `XMLException`

    - #### onReceivedPresence

          protected void onReceivedPresence(Presence presence)
                                     throws JaxmppException

      Throws:
        `JaxmppException`

Copyright © 2006–2020 Tigase. All rights reserved.