public interface SessionConfig
Modifier and Type | Interface and Description |
---|---|
static class |
SessionConfig.CompressionScheme
Compression schemes.
|
Modifier and Type | Method and Description |
---|---|
Set<SessionConfig.CompressionScheme> |
getCompressionSchemes()
Get the compression schemes supported by this connector.
|
int |
getMaximumMessageSize()
The maximum message size to use for the connector.
|
long |
getMaximumQueuedBytes()
Gets the maximum number of bytes that can be used by all outbound message
queues of sessions using this connector.
|
String |
getQueueDefinition()
Gets the queue definition.
|
ReconnectConfig |
getReconnect()
Gets the Reconnect Configuration.
|
long |
getSystemPingFrequency()
Gets the system ping frequency.
|
void |
setCompressionSchemes(Set<SessionConfig.CompressionScheme> schemes)
Set the compression schemes supported by this connector.
|
void |
setMaximumQueuedBytes(long maximumQueuedBytes)
Sets the maximum number of bytes that can be used by all outbound message
queues of sessions using this connector.
|
void |
setQueueDefinition(String queueDefinition)
Sets the queue definition.
|
void |
setSystemPingFrequency(long frequency)
Sets the system ping frequency.
|
void setQueueDefinition(String queueDefinition) throws ConfigException
Optional queue definition for this connector. The definition must have
been defined in the QueuesConfig
for the owning
ServerConfig
. If not specified, the default for the server will
be used.
queueDefinition
- name of configured queue definition.ConfigException
- if unable to set the propertyString getQueueDefinition()
ReconnectConfig getReconnect()
This specifies optional client reconnection properties.
void setSystemPingFrequency(long frequency) throws ConfigException
This is the idle time (no inbound messages) before a client will be pinged by the server. A response must be received by Diffusion before the next interval, else the client is considered to be disconnected.
If this is not explicitly set, no system pings will be performed.
frequency
- a time in milliseconds between connection activity and a
client being pinged. If this is 0, no system pings will be
performed.ConfigException
- if unable to set the propertylong getSystemPingFrequency()
long getMaximumQueuedBytes()
void setMaximumQueuedBytes(long maximumQueuedBytes) throws ConfigException
If the number of bytes queued exceeds this maximum, the server may
attempt to free some memory by compacting the message queues. If the
number of bytes remains above this maximum, sessions will be closed to
free memory. If not specified, the maximum number of bytes is assumed to
be Long.MAX_VALUE
.
This is considered separately from QueueConfig.getMaximumDepth()
and QueueConfig.getMaximumBytes()
.
maximumQueuedBytes
- the maximum queued bytesConfigException
- if the maximum queued bytes is not positivevoid setCompressionSchemes(Set<SessionConfig.CompressionScheme> schemes) throws ConfigException
The server will use this setting to select an appropriate compression
scheme for each session using this connector based on the capabilities
declared by the client. The Java, Android, .NET and JavaScript client
libraries all support the ZLIB
compression
scheme. A JavaScript client must explicitly download the zlib library; it
is packaged separately to reduce the download size of the core library.
By default, all compression schemes are supported.
schemes
- the supported schemes; may be empty to disable compressionConfigException
- if unable to set the propertySet<SessionConfig.CompressionScheme> getCompressionSchemes()
int getMaximumMessageSize()
Currently this is taken from the server configuration and cannot be customised per connector.
Copyright © 2022 Push Technology Ltd. All Rights Reserved.