public final class CompressionManager extends ClientStreamFeatureNegotiator<CompressionFeature>
Manages stream compression as described in XEP-0138: Stream Compression.
If you enable this manager, stream compression will be used, if available. Note that stream compression should not be used, when you use TLS.XMPP Core [1] specifies the use of Transport Layer Security (TLS; see RFC 5246 [2]) for encryption of XML streams, and TLS includes the ability to compress encrypted traffic (see RFC 3749 [3]). However, not all computing platforms are able to implement TLS, and traffic compression may be desirable for communication by applications on such computing platforms. This document defines a mechanism for negotiating the compression of XML streams outside the context of TLS.
| Constructor and Description |
|---|
CompressionManager(XmppSession xmppSession,
TcpBinding tcpBinding) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProcess(java.lang.Object element) |
java.util.List<CompressionMethod> |
getConfiguredCompressionMethods()
Gets the configured compression methods.
|
CompressionMethod |
getNegotiatedCompressionMethod()
Gets the negotiated compression method.
|
StreamNegotiationResult |
processNegotiation(java.lang.Object element) |
getFeatureClassisEnabled, setEnabledpublic CompressionManager(XmppSession xmppSession, TcpBinding tcpBinding)
public final StreamNegotiationResult processNegotiation(java.lang.Object element) throws StreamNegotiationException
StreamNegotiationExceptionpublic final boolean canProcess(java.lang.Object element)
public final CompressionMethod getNegotiatedCompressionMethod()
Gets the negotiated compression method.
public final java.util.List<CompressionMethod> getConfiguredCompressionMethods()
Gets the configured compression methods.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.