Class StreamManager
- java.lang.Object
-
- org.jivesoftware.openfire.streammanagement.StreamManager
-
public class StreamManager extends Object
XEP-0198 Stream Manager. Handles client/server messages acknowledgement.- Author:
- jonnyheavey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StreamManager.UnackedPacket
-
Field Summary
Fields Modifier and Type Field Description static SystemProperty<Boolean>
ACTIVE
static SystemProperty<Boolean>
LOCATION_ENABLED
static SystemProperty<Boolean>
MAX_SERVER_ENABLED
static String
NAMESPACE_V2
Stanza namespacesstatic String
NAMESPACE_V3
-
Constructor Summary
Constructors Constructor Description StreamManager(LocalSession session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
formalClose()
Called when a session receives a closing stream tag, this prevents the session from being detached.boolean
getResume()
Returns true if a stream is resumable.void
incrementServerProcessedStanzas()
Increments the count of stanzas processed by the server since Stream Management was enabled.boolean
isEnabled()
Determines whether Stream Management enabled for session this manager belongs to.static boolean
isStreamManagementActive()
void
onClose(PacketRouter router, org.xmpp.packet.JID serverAddress)
void
onResume(org.xmpp.packet.JID serverAddress, long h)
void
process(org.dom4j.Element element)
Processes a stream management element.void
sendServerAcknowledgement()
Sends XEP-0198 acknowledgement <a /> to client from servervoid
sentStanza(org.xmpp.packet.Packet packet)
Registers that Openfire sends a stanza to the client (which is expected to be acknowledged later).
-
-
-
Field Detail
-
LOCATION_ENABLED
public static SystemProperty<Boolean> LOCATION_ENABLED
-
MAX_SERVER_ENABLED
public static SystemProperty<Boolean> MAX_SERVER_ENABLED
-
ACTIVE
public static SystemProperty<Boolean> ACTIVE
-
NAMESPACE_V2
public static final String NAMESPACE_V2
Stanza namespaces- See Also:
- Constant Field Values
-
NAMESPACE_V3
public static final String NAMESPACE_V3
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StreamManager
public StreamManager(LocalSession session)
-
-
Method Detail
-
isStreamManagementActive
public static boolean isStreamManagementActive()
-
getResume
public boolean getResume()
Returns true if a stream is resumable.- Returns:
- True if a stream is resumable.
-
process
public void process(org.dom4j.Element element)
Processes a stream management element.- Parameters:
element
- The stream management element to be processed.
-
formalClose
public void formalClose()
Called when a session receives a closing stream tag, this prevents the session from being detached.
-
sendServerAcknowledgement
public void sendServerAcknowledgement()
Sends XEP-0198 acknowledgement <a /> to client from server
-
sentStanza
public void sentStanza(org.xmpp.packet.Packet packet)
Registers that Openfire sends a stanza to the client (which is expected to be acknowledged later).- Parameters:
packet
- The stanza that is sent.
-
onClose
public void onClose(PacketRouter router, org.xmpp.packet.JID serverAddress)
-
onResume
public void onResume(org.xmpp.packet.JID serverAddress, long h)
-
isEnabled
public boolean isEnabled()
Determines whether Stream Management enabled for session this manager belongs to.- Returns:
- true when stream management is enabled, otherwise false.
-
incrementServerProcessedStanzas
public void incrementServerProcessedStanzas()
Increments the count of stanzas processed by the server since Stream Management was enabled.
-
-