new ConnectionListener()
This is a dummy constructor not to be used in any case.
Method Summary
- onConnectionCreated
- Event handler that is called when the connection is created.
- onConnectionFailed
- Event handler that is called if the connection can't be created.
- onLSClient
- Event that will be invoked when the embedded LightstreamerClient instance has been created and initialized, but before opening the connection.
Method Detail
-
onConnectionCreated(connection)
-
Event handler that is called when the connection is created. This method will never be called if a ConnectionListener#onConnectionFailed event was fired.
Parameters:
Name Type Description connection
Connection The Connection instance representing the current JMS connection. -
onConnectionFailed(errorCode, errorMessage)
-
Event handler that is called if the connection can't be created. The following error codes are used for specific error conditions on the JMS Extender:
- -13: the JMS Extender configured hook denied acces to the specified user/password pair.
This method will never be called if a ConnectionListener#onConnectionCreated event was fired.Parameters:
Name Type Description errorCode
Number The code of the error. errorMessage
String The description of the error as sent by the Server. -
onLSClient(client)
-
Event that will be invoked when the embedded LightstreamerClient instance has been created and initialized, but before opening the connection. This is the first event to be fired: it offers the possibility to further customize the LightstreamerClient instance before the connection is issued. It can also be used to attach listeners to the given instance. Note that this method is called synchronously inside the factory methods (i.e. it executes before the create*Connection method ends).
Parameters:
Name Type Description client
LightstreamerClient The client instance that will be used to connect to the JMS Extender.