Packagecom.lightstreamer.as_client
Classpublic class ConnectionInfo

ConnectionInfo collects the parameters related to a connection to Lightstreamer Server.



Public Methods
 MethodDefined by
  
ConnectionInfo(server:String = "")
Create an object that encapsulates the connection settings.
ConnectionInfo
  
setAdapter(adapterName:String):void
Setter method that sets the name of the Adapter Set mounted on Lightstreamer Server to be used to handle all requests in the session.
ConnectionInfo
  
setContentLength(contentLength:int):void
Setter method that sets the Content-Length for the stream connection (a minimum length, however, is ensured by the Server).
ConnectionInfo
  
setControlPort(port:uint):void
Setter method that sets the TCP port to be used for the control connections to Lightstreamer Server.
ConnectionInfo
  
setControlProtocol(protocol:String):void
Setter method that sets the protocol to be used for the control connections to Lightstreamer Server.
ConnectionInfo
  
setPassword(password:String):void
Setter method that sets the password to be used for the authentication on Lightstreamer Server on session initiation.
ConnectionInfo
  
setPort(port:uint):void
Setter method that sets the TCP port to be used for the stream/poll connections to Lightstreamer Server.
ConnectionInfo
  
setProtocol(protocol:String):void
Setter method that sets the protocol to be used for the stream/poll connections to Lightstreamer Server.
ConnectionInfo
  
setServer(server:String):void
Setter method that sets the address of Lightstreamer Server.
ConnectionInfo
  
setUser(user:String):void
Setter method that sets the username to be used for the authentication on Lightstreamer Server on session initiation.
ConnectionInfo
Constructor detail
ConnectionInfo()constructor
public function ConnectionInfo(server:String = "")

Create an object that encapsulates the connection settings.

Parameters
server:String (default = "") — The full address of Lightstreamer Server (e.g. "push.mycompany.com").
Method detail
setAdapter()method
public function setAdapter(adapterName:String):void

Setter method that sets the name of the Adapter Set mounted on Lightstreamer Server to be used to handle all requests in the session.
An Adapter Set defines the Metadata Adapter and one or several Data Adapters. It is configured on the server side through an "adapters.xml" file; the ID is configured through the "id" attribute in the "adapters_conf" element.

Parameters
adapterName:String — The name of the Adapter Set te be used.

See also

setContentLength()method 
public function setContentLength(contentLength:int):void

Setter method that sets the Content-Length for the stream connection (a minimum length, however, is ensured by the Server). After the content length exhaustion, the connection will be closed and a new connection will be automatically reopened. If 0 is specified, the Content-Length will be decided by the Server.

Parameters
contentLength:int — The content length in byte. Default value is 50000000.
setControlPort()method 
public function setControlPort(port:uint):void

Setter method that sets the TCP port to be used for the control connections to Lightstreamer Server. Control connections are used to request item subscriptions or unsubscriptions to the Server and for any backward communication to the Server.

Parameters
port:uint — The TCP port to be used for the control connections (default is 8080).

Throws
ConfigurationError — An invalid port number was specified.
setControlProtocol()method 
public function setControlProtocol(protocol:String):void

Setter method that sets the protocol to be used for the control connections to Lightstreamer Server. Control connections are used to request item subscriptions or unsubscriptions to the Server and to change streaming constraints for an active stream connection. They are usually issued in the same protocol used for stream/poll connections, but using HTTP for control and HTTPS for streaming connections is also meaningful.

Parameters
protocol:String — The protocol to be used for the control connections (default is http)

Throws
ConfigurationError — An invalid protocol was specified.
setPassword()method 
public function setPassword(password:String):void

Setter method that sets the password to be used for the authentication on Lightstreamer Server on session initiation. The Metadata Adapter is responsible for credential check.

Parameters
password:String — The password to be used for the authentication on Lightstreamer Server.
setPort()method 
public function setPort(port:uint):void

Setter method that sets the TCP port to be used for the stream/poll connections to Lightstreamer Server.

Parameters
port:uint — The TCP port to be used for the stream/poll connections (default is 8080).

Throws
ConfigurationError — An invalid port number was specified.
setProtocol()method 
public function setProtocol(protocol:String):void

Setter method that sets the protocol to be used for the stream/poll connections to Lightstreamer Server.

Parameters
protocol:String — The protocol to be used for the stream/poll connections (default is "http").

Throws
ConfigurationError — An invalid protocol was specified.
setServer()method 
public function setServer(server:String):void

Setter method that sets the address of Lightstreamer Server.

Parameters
server:String — The full address of Lightstreamer Server (e.g. "push.mycompany.com").
setUser()method 
public function setUser(user:String):void

Setter method that sets the username to be used for the authentication on Lightstreamer Server on session initiation. The Metadata Adapter is responsible for credential check.

Parameters
user:String — The username to be used for the authentication on Lightstreamer Server.