Packagecom.kaazing.gateway.jms.client
Classpublic class ConnectionListenerAdapter
ImplementsConnectionListener

The ConnectionListenerAdapter is a convenience call to create and pass a ConnectionListener to set connection.connectionListener. This convenience class implements the ConnectionListener interface with individual named or anonymous functions. Each function is called with a single argument upon completion of connect, start, stop, and close. Example: function (conn:Connection):void { trace("CONNECTED"); }



Public Methods
 MethodDefined by
  
ConnectionListenerAdapter(onConnect:Function = null, onStart:Function = null, onStop:Function = null, onClose:Function = null)
Creates a new ConnectionListenerAdapter to implement the ConnectionListener interface.
ConnectionListenerAdapter
  
onClose(connection:Connection):void
Called when all services have been stopped and the connection is no longer available.
ConnectionListenerAdapter
  
onConnect(connection:Connection):void
Called when a successful connection is established.
ConnectionListenerAdapter
  
onStart(connection:Connection):void
Called when all services have started, and messages flow for active subscriptions.
ConnectionListenerAdapter
  
onStop(connection:Connection):void
Called when all services have stopped, and messages have stopped flowing for active subscriptions.
ConnectionListenerAdapter
Constructor detail
ConnectionListenerAdapter()constructor
public function ConnectionListenerAdapter(onConnect:Function = null, onStart:Function = null, onStop:Function = null, onClose:Function = null)

Creates a new ConnectionListenerAdapter to implement the ConnectionListener interface. Anonymous or named functions can be passed to implement onConnect, onStart, onStop, and onClose without creating an additional class.

Parameters
onConnect:Function (default = null)
 
onStart:Function (default = null)
 
onStop:Function (default = null)
 
onClose:Function (default = null)
Method detail
onClose()method
public function onClose(connection:Connection):void

Called when all services have been stopped and the connection is no longer available. See ConnectionListener.onClose.

Parameters
connection:Connection
onConnect()method 
public function onConnect(connection:Connection):void

Called when a successful connection is established. See ConnectionListener.onConnect.

Parameters
connection:Connection
onStart()method 
public function onStart(connection:Connection):void

Called when all services have started, and messages flow for active subscriptions. See ConnectionListener.onStart.

Parameters
connection:Connection
onStop()method 
public function onStop(connection:Connection):void

Called when all services have stopped, and messages have stopped flowing for active subscriptions. See ConnectionListener.onStop.

Parameters
connection:Connection