Class StreamManagement.Enabled

java.lang.Object
org.jivesoftware.smack.sm.packet.StreamManagement.Enabled
All Implemented Interfaces:
Element, NamedElement, Nonza, TopLevelStreamElement, XmlElement, XmlLangElement
Enclosing class:
StreamManagement

public static class StreamManagement.Enabled extends Object
A Stream Management 'enabled' element.

Here is a full example, all attributes besides 'xmlns' are optional.

 
 <enabled xmlns='urn:xmpp:sm:3'
      id='some-long-sm-id'
      location='[2001:41D0:1:A49b::1]:9222'
      resume='true'/>
 
 
  • Field Details

    • ELEMENT

      public static final String ELEMENT
      See Also:
    • max

      protected int max
      Preferred maximum resumption time in seconds (optional).
    • resume

      protected boolean resume
  • Constructor Details

  • Method Details

    • getId

      public String getId()
    • getLocation

      public String getLocation()
    • toXML

      public CharSequence toXML(XmlEnvironment enclosingNamespace)
    • getElementName

      Description copied from interface: NamedElement
      Returns the root element name.
      Returns:
      the element name.
    • maybeAddResumeAttributeTo

      protected void maybeAddResumeAttributeTo(XmlStringBuilder xml)
    • maybeAddMaxAttributeTo

      protected void maybeAddMaxAttributeTo(XmlStringBuilder xml)
    • isResumeSet

      public boolean isResumeSet()
    • getMaxResumptionTime

      public int getMaxResumptionTime()
      Return the max resumption time in seconds.
      Returns:
      the max resumption time in seconds
    • getNamespace

      public final String getNamespace()
      Description copied from interface: XmlElement
      Returns the root element XML namespace.
      Specified by:
      getNamespace in interface XmlElement
      Returns:
      the namespace.