Exception: Lightstreamer::Errors::SessionEndError

Inherits:
LightstreamerError show all
Defined in:
lib/lightstreamer/errors.rb

Overview

This error is raised when the session was explicitly closed on the server side. The reason for this is specified by #cause_code.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cause_code) ⇒ SessionEndError

Initializes this session end error with the specified cause code.

Parameters:

  • cause_code (String, Fixnum, nil)

    See #cause_code for details.



165
166
167
168
# File 'lib/lightstreamer/errors.rb', line 165

def initialize(cause_code)
  @cause_code = cause_code&.to_i
  super()
end

Instance Attribute Details

#cause_codeFixnum? (readonly)

The cause code specifying why the session was terminated by the server, or nil if unknown.

The following codes are defined, but other values are allowed and signal an unexpected cause.

  • <=0 - The session was closed through a destroy request and this custom code was specified.
  • 31 - The session was closed through a destroy request.
  • 32 - The session was closed by an administrator through JMX.
  • 33, 34 - An unexpected error occurred on the server.
  • 35 - Another session was opened on the metadata adapter and the metadata adpater only supports one session.
  • 40 - A manual rebind to the session was done by another client.
  • 48 - The maximum session duration configured on the server has been reached. This is meant as a way to refresh the session and the client should recover by opening a new session immediately.

Returns:

  • (Fixnum, nil)


160
161
162
# File 'lib/lightstreamer/errors.rb', line 160

def cause_code
  @cause_code
end