Interface SessionConfig

All Known Subinterfaces:
ConnectorConfig

public interface SessionConfig
Connector session configuration attributes.
Since:
6.2
  • Method Details

    • setQueueDefinition

      void setQueueDefinition(String queueDefinition) throws ConfigException
      Sets the queue definition.

      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.

      Parameters:
      queueDefinition - name of configured queue definition.
      Throws:
      ConfigException - if unable to set the property
    • getQueueDefinition

      String getQueueDefinition()
      Gets the queue definition.
      Returns:
      queue definition or null if none defined for this connector.
    • getReconnect

      ReconnectConfig getReconnect()
      Gets the Reconnect Configuration.

      This specifies optional client reconnection properties.

      Returns:
      Reconnection configuration.
    • setSystemPingFrequency

      void setSystemPingFrequency(long frequency) throws ConfigException
      Sets the system ping frequency.

      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.

      Parameters:
      frequency - a time in milliseconds between connection activity and a client being pinged. If this is 0, no system pings will be performed.
      Throws:
      ConfigException - if unable to set the property
    • getSystemPingFrequency

      long getSystemPingFrequency()
      Gets the system ping frequency.
      Returns:
      system ping frequency value in milliseconds. A value of 0 indicates that no system pings will be performed.
    • getMaximumQueuedBytes

      long getMaximumQueuedBytes()
      Gets the maximum number of bytes that can be used by all outbound message queues of sessions using this connector.
      Returns:
      the maximum number of bytes that can be used by all outbound message queues of sessions using this connector
      Since:
      6.1
    • setMaximumQueuedBytes

      void setMaximumQueuedBytes(long maximumQueuedBytes) throws ConfigException
      Sets the maximum number of bytes that can be used by all outbound message queues of sessions using this connector.

      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().

      Parameters:
      maximumQueuedBytes - the maximum queued bytes
      Throws:
      ConfigException - if the maximum queued bytes is not positive
      Since:
      6.1
    • setCompressionSchemes

      void setCompressionSchemes(Set<SessionConfig.CompressionScheme> schemes) throws ConfigException
      Set the compression schemes supported by this connector.

      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.

      Parameters:
      schemes - the supported schemes; may be empty to disable compression
      Throws:
      ConfigException - if unable to set the property
      Since:
      6.2
    • getCompressionSchemes

      Set<SessionConfig.CompressionScheme> getCompressionSchemes()
      Get the compression schemes supported by this connector.
      Returns:
      the supported schemes; may be empty
      Since:
      6.2
    • getMaximumMessageSize

      int getMaximumMessageSize()
      The maximum message size to use for the connector.

      Currently this is taken from the server configuration and cannot be customised per connector.

      Returns:
      maximum message size in bytes
      Since:
      6.4