Class StreamManager
java.lang.Object
org.jivesoftware.openfire.streammanagement.StreamManager
XEP-0198 Stream Manager.
Handles client/server messages acknowledgement.
- Author:
- jonnyheavey
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic SystemProperty<Boolean>static SystemProperty<Boolean>static SystemProperty<Boolean>static SystemProperty<Boolean>static final StringStanza namespacesstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when a session receives a closing stream tag, this prevents the session from being detached.booleanReturns true if a stream is resumable.voidIncrements the count of stanzas processed by the server since Stream Management was enabled.booleanDetermines whether Stream Management enabled for session this manager belongs to.static booleanvoidonClose(PacketRouter router, org.xmpp.packet.JID serverAddress) voidonResume(org.xmpp.packet.JID serverAddress, long h) voidprocess(org.dom4j.Element element) Processes a stream management element.voidSends XEP-0198 acknowledgement <a /> to client from servervoidsentStanza(org.xmpp.packet.Packet packet) Registers that Openfire sends a stanza to the client (which is expected to be acknowledged later).
-
Field Details
-
LOCATION_ENABLED
-
LOCATION_TERMINATE_OTHERS_ENABLED
-
MAX_SERVER_ENABLED
-
ACTIVE
-
NAMESPACE_V2
Stanza namespaces- See Also:
-
NAMESPACE_V3
- See Also:
-
-
Constructor Details
-
StreamManager
-
-
Method Details
-
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
-
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.
-