Class StreamManagement.Enabled

java.lang.Object
org.jivesoftware.smack.sm.packet.StreamManagement.Enabled
All Implemented Interfaces:
org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.Nonza, org.jivesoftware.smack.packet.TopLevelStreamElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.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

    • Enabled

      public Enabled(String id, boolean resume)
    • Enabled

      public Enabled(String id, boolean resume, String location, int max)
  • Method Details

    • getId

      public String getId()
    • getLocation

      public String getLocation()
    • toXML

      public CharSequence toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
    • getElementName

      public String getElementName()
    • maybeAddResumeAttributeTo

      protected void maybeAddResumeAttributeTo(org.jivesoftware.smack.util.XmlStringBuilder xml)
    • maybeAddMaxAttributeTo

      protected void maybeAddMaxAttributeTo(org.jivesoftware.smack.util.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()
      Specified by:
      getNamespace in interface org.jivesoftware.smack.packet.XmlElement