com.lightstreamer.jmx
Interface SessionMBean


public interface SessionMBean

Multiple SessionMBean instances are allowed in the system. Each SessionMBean instance pertains to one Session. Each Session can be bound to 0 or 1 SessionMBean instances. Each SessionMBean instance is created by Lightstreamer Server right after the creation of the Session. Each SessionMBean instance is destroyed by Lightstreamer Server just before the underlying Session terminates.

SessionMBean name pattern:
"com.lightstreamer:type=Session,sessionId=<sessionId>"


Method Summary
 java.lang.Boolean destroySession()
          Disconnect the Client and destroys this Session.
 java.lang.String getAdapterSet()
           
 java.lang.Double getAllocatedMaxBandwidthKbps()
           
 java.lang.Long getCumulControlConnections()
          [TO BE IMPLEMENTED]
 java.lang.Long getCumulControlRequestsFailed()
          [TO BE IMPLEMENTED]
 java.lang.Long getCumulFilteredEvents()
          [TO BE IMPLEMENTED]
 java.lang.Long getCumulFilteredEvents(java.lang.String itemName)
          [TO BE IMPLEMENTED]
 java.lang.Long getCumulItemUpdates()
           
 java.lang.Long getCumulLostEvents()
          [TO BE IMPLEMENTED]
 java.lang.Long getCumulLostEvents(java.lang.String itemName)
          [TO BE IMPLEMENTED]
 java.lang.Long getCumulOutboundBytes()
           
 java.lang.Long getCumulPollingConnections()
          [TO BE IMPLEMENTED]
 java.lang.Long getCumulStreamConnections()
          [TO BE IMPLEMENTED]
 java.lang.Double getCurrentBandwidthKbps()
           
 java.lang.Boolean getIsPolling()
           
 java.lang.Boolean getIsStreaming()
           
 java.lang.Long getItemUpdateFrequency()
           
 java.lang.String getLocalPort()
          [TO BE IMPLEMENTED]
 java.lang.Double getMaxBandwidthKbps()
           
 java.lang.Integer getMaxFilteredEvents()
           
 java.lang.Long getMaxItemUpdateFrequency()
           
 java.lang.Integer getMaxLostEvents()
           
 java.lang.Integer getNewFilteredEvents()
           
 java.lang.Integer getNewLostEvents()
           
 java.lang.String getRemoteHostname()
           
 java.lang.String getRemoteIP()
           
 java.lang.String getRemotePort()
          [TO BE IMPLEMENTED]
 java.lang.String getSessionId()
           
 java.util.Date getStartTime()
          [TO BE IMPLEMENTED]
 java.util.List getSubscribedItemList()
           
 java.lang.Long getSubscribedItems()
           
 java.lang.Integer getTotalFields()
          [TO BE IMPLEMENTED]
 java.lang.String getUserAgent()
          [TO BE IMPLEMENTED]
 java.lang.String getUsername()
           
 void setAllocatedMaxBandwidthKbps(java.lang.Double bandwidth)
           
 

Method Detail

getSessionId

java.lang.String getSessionId()
Returns:
The sessionId of this Session.

getStartTime

java.util.Date getStartTime()
[TO BE IMPLEMENTED]

Returns:
The timestamp of the creation of this Session.

getLocalPort

java.lang.String getLocalPort()
[TO BE IMPLEMENTED]

Returns:
The local TCP port of the server socket of the current (or last) Stream or Polling Connection of this Session.

getRemoteIP

java.lang.String getRemoteIP()
Returns:
The remote IP address of the current (or last) Client connected to this Session.

getRemoteHostname

java.lang.String getRemoteHostname()
Returns:
The remote hostname of the current (or last) Client connected to this Session.

getRemotePort

java.lang.String getRemotePort()
[TO BE IMPLEMENTED]

Returns:
The remote TCP port of the client socket of the current (or last) Stream or Polling Connection.

getUserAgent

java.lang.String getUserAgent()
[TO BE IMPLEMENTED]

Returns:
The user agent of the Client bound to this Session. This value is obtained from the "User-Agent" field of the HTTP header of the Client request.

getUsername

java.lang.String getUsername()
Returns:
The username of the User owning this Session. It may be null.

getAdapterSet

java.lang.String getAdapterSet()
Returns:
The name of the Adapter Set bound to this Session.

getSubscribedItems

java.lang.Long getSubscribedItems()
Returns:
The number of Items currently subscribed by this Session. Items with multiple subscriptions are reported only once.

getSubscribedItemList

java.util.List getSubscribedItemList()
Returns:
The list of Items currently subscribed by this Session. Expressed as an ArrayList of Strings, where each String contains the itemName of the Item. Items with multiple subscriptions are reported only once.

getTotalFields

java.lang.Integer getTotalFields()
[TO BE IMPLEMENTED]

Returns:
The total number of Fields currently subscribed by this Session. Multiple subscriptions of the same item are summed together.

getCumulOutboundBytes

java.lang.Long getCumulOutboundBytes()
Returns:
The total (cumulative) number of bytes sent for this Session. The value aggregates all HTTP contents sent on all the Connections that were bound to the Session.

getCumulItemUpdates

java.lang.Long getCumulItemUpdates()
Returns:
The total (cumulative) number of Item Updates sent for this Session.

getItemUpdateFrequency

java.lang.Long getItemUpdateFrequency()
Returns:
The frequency of outbound Item Updates sent for this Session in the last sampling period. It is expressed as updates per second.

getMaxItemUpdateFrequency

java.lang.Long getMaxItemUpdateFrequency()
Returns:
The maximum frequency of outbound Item Updates reached for this Session. It is expressed as updates per second.

getIsStreaming

java.lang.Boolean getIsStreaming()
Returns:
true if a Stream connection is currently attached to this Session.

getIsPolling

java.lang.Boolean getIsPolling()
Returns:
true if a Polling Connection is currently attached to this Session or the Session is being kept alive, waiting for a Polling Connection.

getCumulStreamConnections

java.lang.Long getCumulStreamConnections()
[TO BE IMPLEMENTED]

Returns:
The total (cumulative) number of Stream Connections opened for this Session.

getCumulPollingConnections

java.lang.Long getCumulPollingConnections()
[TO BE IMPLEMENTED]

Returns:
The total (cumulative) number of Polling Connections opened for this Session.

getCumulControlConnections

java.lang.Long getCumulControlConnections()
[TO BE IMPLEMENTED]

Returns:
The total (cumulative) number of Control Connections opened for this Session.

getCumulControlRequestsFailed

java.lang.Long getCumulControlRequestsFailed()
[TO BE IMPLEMENTED]

Returns:
The total (cumulative) number of Control requests failed for this Session.

getCurrentBandwidthKbps

java.lang.Double getCurrentBandwidthKbps()
Returns:
The current outbound bandwidth used by the Server for this Session (in the last sampling period). It is expressed as Kilobits per second and is comprised of network overheads.

getMaxBandwidthKbps

java.lang.Double getMaxBandwidthKbps()
Returns:
The maximum outbound bandwidth used by the Server for this Session. It is expressed as Kilobits per second and is comprised of network overheads.

getAllocatedMaxBandwidthKbps

java.lang.Double getAllocatedMaxBandwidthKbps()
Returns:
The maximum outbound bandwidth allocated by the Server for this Session. It is expressed as Kilobits per second and is comprised of network overheads.

setAllocatedMaxBandwidthKbps

void setAllocatedMaxBandwidthKbps(java.lang.Double bandwidth)
Parameters:
bandwidth - The new maximum outbound bandwidth allocated by the Server for this Session. It is expressed as Kilobits per second and is comprised of network overheads.

getNewLostEvents

java.lang.Integer getNewLostEvents()
Returns:
The number of lost events for Items subscribed to in an unfiltered mode in the last sampling period. This applies to Items subscribed to in RAW mode, or in any mode with unfiltered dispatching specified. This also applies to items subscribed to in COMMAND mode with filtered dispatching, restricted to "ADD" and "DELETE" events only.

getMaxLostEvents

java.lang.Integer getMaxLostEvents()
Returns:
The max number of lost events for Items subscribed to in an unfiltered mode (as specified for getNewLostEvents()) in a sampling period.

getCumulLostEvents

java.lang.Long getCumulLostEvents()
[TO BE IMPLEMENTED]

Returns:
The total (cumulative) number of lost events for Items subscribed to in an unfiltered mode (as specified for getNewLostEvents()).

getNewFilteredEvents

java.lang.Integer getNewFilteredEvents()
Returns:
The number of filtered events for Items not subscribed to in an unfiltered mode (as specified for getNewLostEvents()) in the last sampling period.

getMaxFilteredEvents

java.lang.Integer getMaxFilteredEvents()
Returns:
The max number of filtered events for Items not subscribed to in an unfiltered mode (as specified for getNewLostEvents()) in a sampling period.

getCumulFilteredEvents

java.lang.Long getCumulFilteredEvents()
[TO BE IMPLEMENTED]

Returns:
The total (cumulative) number of filtered events for Items not subscribed to in an unfiltered mode (as specified for getNewLostEvents()).

getCumulLostEvents

java.lang.Long getCumulLostEvents(java.lang.String itemName)
[TO BE IMPLEMENTED]

Parameters:
itemName - an Item name.
Returns:
The total (cumulative) number of lost events for itemName item, provided that it is subscribed to in an unfiltered mode (as specified for getNewLostEvents()).

getCumulFilteredEvents

java.lang.Long getCumulFilteredEvents(java.lang.String itemName)
[TO BE IMPLEMENTED]

Parameters:
itemName - an Item name.
Returns:
The total (cumulative) number of filtered events for itemName item, provided that it is not subscribed to in an unfiltered mode (as specified for getNewLostEvents()).

destroySession

java.lang.Boolean destroySession()
Disconnect the Client and destroys this Session.

Returns:
True if operation succeded. False if operation failed.