com.lightstreamer.ls_client
Class ConnectionInfo
java.lang.Object
com.lightstreamer.ls_client.ConnectionInfo
- All Implemented Interfaces:
- java.lang.Cloneable
public class ConnectionInfo
- extends java.lang.Object
- implements java.lang.Cloneable
Collects the parameters related to a connection request to Lightstreamer
Server.
|
Field Summary |
java.lang.String |
adapter
ID of the Adapter Set to be used to handle all requests in the session. |
ConnectionConstraints |
constraints
Configuration object that specifies the constraints to be applied
on the overall data flow from the Connection. |
int |
contentLength
Content-Length value to set for the stream connection (a minimum length,
however, is ensured by the server). |
boolean |
isPolling
If set to true, data streaming is simulated through a polling
mechanism, that is a sequence of synchronous connections to the Server,
each of which will receive the currently available updates. |
long |
keepaliveMillis
Keepalive time requested for the stream connection. |
java.lang.String |
password
User password to be supplied to the Server in the connection request. |
long |
pollingIdleMillis
Maximum time the Server is allowed to wait for updates in case none
are available at connection time and a poll connection has been
requested. |
long |
pollingMillis
Time between the end of a poll connection and the start of the next
one, if polling behaviour has been specified. |
long |
probeTimeoutMillis
Timeout for activity checks on the stream connection, expressed in
milliseconds. |
long |
probeWarningMillis
Warning timeout for activity checks on the stream connection,
expressed in milliseconds. |
java.lang.String |
pushServerControlUrl
Lightstreamer Server URL (without the path part) to be used for
control requests;
e.g. |
java.lang.String |
pushServerUrl
Lightstreamer Server URL, without the path part;
e.g. |
long |
reconnectionTimeoutMillis
The maximum elapsed time in milliseconds allowed for a successful
reconnection attempt. |
java.lang.String |
user
User name to be supplied to the Server in the connection request. |
|
Constructor Summary |
ConnectionInfo()
Creates a connection settings bean object with default settings
specified. |
|
Method Summary |
java.lang.Object |
clone()
Method clone. |
boolean |
equals(java.lang.Object other)
Method equals. |
java.lang.String |
toString()
Method toString. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
probeTimeoutMillis
public long probeTimeoutMillis
- Timeout for activity checks on the stream connection, expressed in
milliseconds. If no data is being received and a keepalive message
is late for this time, the connection is closed.
It should be far greater than the keepalive time configured on the
Server or set in keepaliveMillis.
The default setting is 10000 (10 seconds).
probeWarningMillis
public long probeWarningMillis
- Warning timeout for activity checks on the stream connection,
expressed in milliseconds. If no data is being received and a keepalive
message is late for this time, a notification is issued to the
ConnectionListener. If then some data or keepalive is received before
probeTimeoutMillis elapses, a new notification is issued to the
ConnectionListener.
It should be smaller than probeTimeoutMillis.
The default setting is 2000 (2 seconds).
keepaliveMillis
public long keepaliveMillis
- Keepalive time requested for the stream connection.
After an inactivity of this length on the stream connection, a keepalive
signal is sent by the Server.
If it is 0, the keepalive time is decided by the Server. If it is too
small, the Server may use a different keepalive time as well.
The default setting is 0.
reconnectionTimeoutMillis
public long reconnectionTimeoutMillis
- The maximum elapsed time in milliseconds allowed for a successful
reconnection attempt. Silent reconnections are performed in case
of Content-Length filling or if polling behaviour has been requested.
NOTE: The first connection is not checked against this timeout. This
can be done by the user by observing the elapsed time in the
LSClient.openConnection call.
The default setting is 30000 (30 seconds).
contentLength
public int contentLength
- Content-Length value to set 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 it is 0, the Content-Length is decided by the Server.
The default setting is set to a very high value (50 millions).
pushServerUrl
public java.lang.String pushServerUrl
- Lightstreamer Server URL, without the path part;
e.g. "https://push.lightstreamer.com".
Setting this property is mandatory.
pushServerControlUrl
public java.lang.String pushServerControlUrl
- Lightstreamer Server URL (without the path part) to be used for
control requests;
e.g. "http://push.lightstreamer.com:80".
Typically, it may differ from pushServerUrl because of the protocol.
If it is null, then pushServerUrl is used.
The default setting is null.
user
public java.lang.String user
- User name to be supplied to the Server in the connection request.
If it is null, no User name is supplied.
The default setting is null.
password
public java.lang.String password
- User password to be supplied to the Server in the connection request.
If it is null, no User password is supplied.
The default setting is null.
adapter
public java.lang.String adapter
- ID of the Adapter Set 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.
The default setting is null, which is equivalent to the "DEFAULT" ID.
- See Also:
SimpleTableInfo.setDataAdapter(java.lang.String)
isPolling
public boolean isPolling
- If set to true, data streaming is simulated through a polling
mechanism, that is a sequence of synchronous connections to the Server,
each of which will receive the currently available updates.
The use of polling can become necessary in cases where the connection
stream is not delivered in real time because of some router or firewall
or antivirus.
The default setting is false.
pollingMillis
public long pollingMillis
- Time between the end of a poll connection and the start of the next
one, if polling behaviour has been specified.
Zero is a legal value, although the Server may decide to delay request
fulfilling if request frequency is too high.
Note: since the Server needs to keep a session active between
subsequent poll connections, the Server may force the library to
use a polling time shorter than requested.
The default setting is 0.
pollingIdleMillis
public long pollingIdleMillis
- Maximum time the Server is allowed to wait for updates in case none
are available at connection time and a poll connection has been
requested. A zero value leads to a classical polling behaviour, while
a nonzero value leads to an "asynchronous polling" behaviour.
Typically, a nonzero value for this attribute is associated with a zero
value for the "pollingMillis" attribute.
Note: since the Server, while waiting for an update, needs to keep
a socket and a session active, even if the client has already closed
the connection on its side, the Server may force a shorter wait.
The default setting is 0.
constraints
public ConnectionConstraints constraints
- Configuration object that specifies the constraints to be applied
on the overall data flow from the Connection.
The specified constraints can only be used in order to restrict
the constraints set by Lightstreamer Server Metadata Adapter.
It cannot be null.
The default setting is a constraints configuration object with no
constraints specified.
ConnectionInfo
public ConnectionInfo()
- Creates a connection settings bean object with default settings
specified.
toString
public java.lang.String toString()
- Method toString.
- Overrides:
toString in class java.lang.Object
- Returns:
- ...
clone
public java.lang.Object clone()
- Method clone.
- Overrides:
clone in class java.lang.Object
- Returns:
- ...
equals
public boolean equals(java.lang.Object other)
- Method equals.
- Overrides:
equals in class java.lang.Object
- Returns:
- ...