Interface ResourceMBean


  • public interface ResourceMBean
    One ResourceMBean instance exists in the system, to provide information on the activity of the Server. It is created at startup by Lightstreamer Server and lasts until the shutdown of the Server.

    ResourceMBean name:
    "com.lightstreamer:type=Resource"
    • Method Detail

      • getTotalSubscribedItems

        java.lang.Long getTotalSubscribedItems()
        Returns:
        The total number of currently subscribed Items, covering all the Data Adapters from all the Adapter Sets plugged in the Server. The count includes subscriptions needed to accomplish the Push Notification service.
      • getUsernames

        java.lang.Integer getUsernames()
        Returns:
        The number of unique user names of users currently connected to the Server.
      • getUsernameList

        java.util.List<java.lang.String> getUsernameList()
        Returns:
        The list of unique user names of users currently connected to the Server. Expressed as an ArrayList of Strings, where each String contains a user name. Note that null is a possible user name.
      • getSessionListForUsername

        java.util.List<java.lang.String> getSessionListForUsername​(java.lang.String username)
        Parameters:
        username - a User name, possibly null.
        Returns:
        The list of current Sessions owned by the specified User. Expressed as an ArrayList of Strings, where each String contains the sessionID of the Session. The list includes "prestarted" sessions.
        See Also:
        getCurrentSessions()
      • getCurrentSessions

        java.lang.Integer getCurrentSessions()
        Returns:
        The number of currently active Sessions. Prestarted Sessions are not considered for this statistics. By prestarted Session we mean a session for which no related requests have been received yet. Binding a session with a new connection also brings it out of the prestarted state.
      • getCurrentPrestartedSessions

        java.lang.Integer getCurrentPrestartedSessions()
        Returns:
        The current number of prestarted Sessions. By prestarted Session we mean a session for which no related requests have been received yet. Binding a session with a new connection also brings it out of the prestarted state.
      • getCurrentPrestartedAverageWaitMillis

        java.lang.Long getCurrentPrestartedAverageWaitMillis()
        Returns:
        The average time the Sessions currently prestarted are in this state. A long average time may signal that many clients are stuck while trying to create sessions.
        See Also:
        getCurrentPrestartedSessions()
      • getCurrentSessionList

        java.util.List<java.lang.String> getCurrentSessionList()
        Returns:
        The list of current Sessions. Expressed as an ArrayList of Strings, where each String contains the sessionID of the Session. The list includes "prestarted" sessions.
        See Also:
        getCurrentSessions()
      • getMaxSessions

        java.lang.Integer getMaxSessions()
        Returns:
        The maximum number of concurrent Sessions reached in the life of the Server. "Prestarted" Sessions are not considered.
        See Also:
        getCurrentSessions()
      • getMaxPrestartedSessions

        java.lang.Integer getMaxPrestartedSessions()
        Returns:
        The maximum number of concurrent prestarted Sessions reached in the life of the Server.
        See Also:
        getCurrentPrestartedSessions()
      • getCumulStartedSessions

        java.lang.Long getCumulStartedSessions()
        Returns:
        The total (cumulative) number of Sessions started in the life of the Server. Sessions still in "prestarted" state and sessions closed while still in "prestarted" state are not considered.
        See Also:
        getCurrentSessions()
      • getCumulTerminatedSessions

        java.lang.Long getCumulTerminatedSessions()
        Returns:
        The total (cumulative) number of Sessions terminated in the life of the Server. Sessions closed while still in "prestarted" state are not considered.
        See Also:
        getCurrentSessions(), getCumulSessionCloseCauses(String)
      • getCumulSessionCloseCauses

        java.util.Map<java.lang.String,​java.lang.Long> getCumulSessionCloseCauses​(java.lang.String placeholder)
        Parameters:
        placeholder - Dummy argument that turns the property into an operation and prevents JMX clients from computing the result in a non-interacting way. It can be left null.
        Returns:
        A Map which associates all different causes of session termination to the number of occurrences of such terminations in the life of the Server. The possible causes are freely determined internally and are represented by a textual description. Causes with no occurrences are not reported.
      • getNewStartedSessions

        java.lang.Integer getNewStartedSessions()
        Returns:
        The number of Sessions started in the last sampling period. Sessions still in "prestarted" state and sessions closed while still in "prestarted" state are not considered.
        See Also:
        getCurrentSessions()
      • getNewTerminatedSessions

        java.lang.Integer getNewTerminatedSessions()
        Returns:
        The number of Sessions terminated in the last sampling period. Sessions closed while still in "prestarted" state are not considered.
        See Also:
        getCurrentSessions(), getNewSessionCloseCauses(String)
      • getNewSessionCloseCauses

        java.util.Map<java.lang.String,​java.lang.Long> getNewSessionCloseCauses​(java.lang.String placeholder)
        Parameters:
        placeholder - Dummy argument that turns the property into an operation and prevents JMX clients from computing the result in a non-interacting way. It can be left null.
        Returns:
        A Map which associates all different causes of session termination to the number of occurrences of such terminations in the last sampling period. The possible causes are freely determined internally and are represented by a textual description. Causes with no occurrences are not reported.
      • destroySession

        java.lang.Boolean destroySession​(java.lang.String sessionId)
        Destroys a Session for a specified ID, if currently active.
        Parameters:
        sessionId - a session ID.
        Returns:
        True if operation succeeded. False if operation failed.
      • getCurrentStreamingSessions

        java.lang.Integer getCurrentStreamingSessions()
        Returns:
        The number of current Sessions that are working in Streaming. "Prestarted" Sessions are not considered.
      • getMaxStreamingSessions

        java.lang.Integer getMaxStreamingSessions()
        Returns:
        The maximum number of concurrent Sessions working in Streaming reached in the life of the Server. "Prestarted" Sessions are not considered.
      • getCumulStreamingRequests

        java.lang.Long getCumulStreamingRequests()
        Returns:
        The total (cumulative) number of Requests for Streaming data received in the life of the Server. Note that multiple subsequent Requests for Streaming data are possible throughout the life of a single Session.
      • getCumulStreamingResponses

        java.lang.Long getCumulStreamingResponses()
        Returns:
        The total (cumulative) number of Requests for Streaming data fully accomplished in the life of the Server. Note that multiple subsequent Requests for Streaming data are possible throughout the life of a single Session.
      • getCumulRequestsFailed

        java.lang.Long getCumulRequestsFailed()
        Returns:
        The total (cumulative) number of Requests of any type that have failed in the life of the Server. It comprises Streaming, Polling, Control and Web Server requests. See getNewControlRequests() for details on how Control Requests are counted.
        Note that the concept of failed request is not a strict one; a few main considerations have to be taken into account:
        • If multiple subrequests of a single Control Request are counted and a severe error occurs in the processing which causes a single error message for the whole Request to be reported to the client, then all subrequests will be considered as failed, regardless of their real outcome.
        • Streaming and Polling requests are never counted as failed after the data collection phase has started.
        • Exceptions received from the Data Adapter in subscription and unsubscription operations are not reported to the clients and they are not considered as causing requests to fail.
        • In case of requests for asynchronous message submission, exceptions received from the Metadata Adapter upon submission are not considered as causing requests to fail.
      • getCumulRequestsRefused

        java.lang.Long getCumulRequestsRefused()
        Returns:
        The total (cumulative) number of Requests that have been refused in the life of the Server. Specifically, it applies to Requests for opening new Sessions that have been refused because of load limits, including thread pool queue limits.
      • getNewRequestsFailed

        java.lang.Integer getNewRequestsFailed()
        Returns:
        The number of Requests of any type that have failed in the last sampling period. It comprises Streaming, Polling, Control and Web Server requests. See getCumulRequestsFailed() for remarks on the identification of failed requests.
      • getNewRequestsRefused

        java.lang.Integer getNewRequestsRefused()
        Returns:
        The number of Requests that have been refused in the last sampling period. Specifically, it applies to Requests for opening new Sessions that have been refused because of load limits, including thread pool queue limits.
      • getNewStreamingRequests

        java.lang.Integer getNewStreamingRequests()
        Returns:
        The number of Requests for Streaming data opened in the last sampling period. Note that multiple subsequent Requests for Streaming data are possible throughout the life of a single Session.
      • getNewStreamingResponses

        java.lang.Integer getNewStreamingResponses()
        Returns:
        The number of Requests for Streaming data fully accomplished and completed in the last sampling period. Note that multiple subsequent Requests for Streaming data are possible throughout the life of a single Session.
      • getCurrentPollingSessions

        java.lang.Integer getCurrentPollingSessions()
        Returns:
        The number of current Sessions that are working in Polling. Note that Streaming Sessions may, in their initial phase, act as Polling Sessions; in that case, they may be temporarily included in this count. "Prestarted" Sessions are not considered.
        See Also:
        getCurrentSessions()
      • getMaxPollingSessions

        java.lang.Integer getMaxPollingSessions()
        Returns:
        The maximum number of concurrent Sessions working in Polling reached in the life of the Server. Note that Streaming Sessions may, in their initial phase, act as Polling Sessions; in that case, they may be temporarily included in this count. "Prestarted" Sessions are not considered.
        See Also:
        getCurrentSessions()
      • getCumulPollingRequests

        java.lang.Long getCumulPollingRequests()
        Returns:
        The total (cumulative) number of Requests for single polls received in the life of the Server.
      • getCumulPollingResponses

        java.lang.Long getCumulPollingResponses()
        Returns:
        The total (cumulative) number of Requests for single polls accomplished in the life of the Server.
      • getNewPollingRequests

        java.lang.Integer getNewPollingRequests()
        Returns:
        The number of Requests for single polls received in the last sampling period.
      • getNewPollingResponses

        java.lang.Integer getNewPollingResponses()
        Returns:
        The number of Requests for single polls accomplished and completed in the last sampling period.
      • getCumulControlResponses

        java.lang.Long getCumulControlResponses()
        Returns:
        The total (cumulative) number of Control Requests accomplished in the life of the Server. See the text protocol documentation for a resume of the possible Control Requests. See getNewControlRequests() for details on how Control Requests are counted.
      • getNewControlRequests

        java.lang.Integer getNewControlRequests()
        Returns:
        The number of Control Requests received in the last sampling period. See the text protocol documentation for a resume of the possible Control Requests.
        Note that single Control Requests may contain multiple subrequests; in this case, each subrequest is counted separately, unless the processing fails before the full interpretation of the Request.
      • getNewControlResponses

        java.lang.Integer getNewControlResponses()
        Returns:
        The number of Control Requests accomplished and completed in the last sampling period. See the text protocol documentation for a resume of the possible Control Requests. See getNewControlRequests() for details on how Control Requests are counted.
      • getCumulPageResponses

        java.lang.Long getCumulPageResponses()
        Returns:
        The total (cumulative) number of Requests to be managed by the Internal Web Server accomplished in the life of the Server. The Internal Web Server should not be enabled in a production scenario; even in that case, some special requests related with the push activity are still accomplished by the Internal Web Server.
      • getNewPageRequests

        java.lang.Integer getNewPageRequests()
        Returns:
        The number of Requests to be managed by the Internal Web Server received in the last sampling period. The Internal Web Server should not be enabled in a production scenario; even in that case, some special requests related with the push activity are still accomplished by the Internal Web Server.
      • getNewPageResponses

        java.lang.Integer getNewPageResponses()
        Returns:
        The number of Requests to be managed by the Internal Web Server accomplished and completed in the last sampling period. The Internal Web Server should not be enabled in a production scenario; even in that case, some special requests related with the push activity are still accomplished by the Internal Web Server.
      • getCumulUnrecognizedRequests

        java.lang.Long getCumulUnrecognizedRequests()
        Returns:
        The total (cumulative) number of Requests that could not be understood managed in the life of the Server.
      • getNewUnrecognizedRequests

        java.lang.Integer getNewUnrecognizedRequests()
        Returns:
        The number of Requests that could not be understood managed in the last sampling period.
      • getCumulResponses

        java.lang.Long getCumulResponses()
        Returns:
        The total (cumulative) number of Requests accomplished in the life of the Server. It comprises Streaming, Polling, Control, Web Server and unrecognized requests. It also includes any client reverse heartbeats received. See getNewControlRequests() for details on how Control Requests are counted.
      • getNewRequests

        java.lang.Integer getNewRequests()
        Returns:
        The number of Requests received in the last sampling period. It comprises Streaming, Polling, Control, Web Server and unrecognized requests. It also includes any client reverse heartbeats received. See getNewControlRequests() for details on how Control Requests are counted.
      • getNewResponses

        java.lang.Integer getNewResponses()
        Returns:
        The number of Requests accomplished and completed in the last sampling period. It comprises Streaming, Polling, Control, Web Server and unrecognized requests. It also includes any client reverse heartbeats received. See getNewControlRequests() for details on how Control Requests are counted.
      • getCurrentSockets

        java.lang.Integer getCurrentSockets()
        Returns:
        The number of currently connected sockets, which may carry any kind of Request. Sockets currently idle or performing a TLS/SSL initial handshake are also included in this count (see getCurrentIdleSockets() and getCurrentHandshakingSockets()).
      • getCurrentHTTPSockets

        java.lang.Integer getCurrentHTTPSockets()
        Returns:
        The number of currently connected sockets, which may carry any kind of Request, used for normal HTTP interaction. Note that, when socket reuse is possible, multiple subsequent requests may be carried by a single socket connection; connections left in an idle state by the client, waiting for a possible reuse, are also included in this count. On the other hand, when the HTTP interaction is upgraded to the WebSocket protocol, the socket is no longer included in this count (see getCurrentWSSockets()).
      • getCurrentHTTPSSockets

        java.lang.Integer getCurrentHTTPSSockets()
        Returns:
        The number of currently connected sockets, which may carry any kind of Request, used for HTTP over TLS/SSL interaction. Note that, when socket reuse is possible, multiple subsequent requests may be carried by a single socket connection; connections left in an idle state by the client, waiting for a possible reuse, are also included in this count. On the other hand, when the HTTP interaction is upgraded to the WebSocket protocol, the socket is no longer included in this count (see getCurrentWSSSockets()).
      • getCurrentWSSockets

        java.lang.Integer getCurrentWSSockets()
        Returns:
        The number of currently connected sockets managed through the normal WebSocket protocol. Note that WebSocket connections may be used by the clients to issue one or multiple requests concurrently, or may also be kept idle for some time; a WebSocket connection is included in this count regardless of the current state of activity.
      • getCurrentWSSSockets

        java.lang.Integer getCurrentWSSSockets()
        Returns:
        The number of currently connected sockets managed through the WebSocket protocol over TLS/SSL. Note that WebSocket connections may be used by the clients to issue one or multiple requests concurrently, or may also be kept idle for some time; a WebSocket connection is included in this count regardless of the current state of activity.
      • getCurrentIdleSockets

        java.lang.Integer getCurrentIdleSockets()
        Returns:
        The number of currently connected sockets that are being left in an idle state by the client, waiting for a possible reuse. The count includes WebSocket connections for which no request is currently in process.
      • getCurrentHandshakingSockets

        java.lang.Integer getCurrentHandshakingSockets()
        Returns:
        The number of currently connected sockets that are performing a TLS/SSL handshake, in order to initiate an HTTP over TLS/SSL interaction.
      • getMaxSockets

        java.lang.Integer getMaxSockets()
        Returns:
        The maximum number of concurrent connected sockets, which may have carried any kind of Request, reached in the life of the Server. See getCurrentSockets().
      • getMaxHTTPSockets

        java.lang.Integer getMaxHTTPSockets()
        Returns:
        The maximum number of concurrent connected sockets, which may have carried any kind of Request, used for normal HTTP interaction, reached in the life of the Server. See getCurrentHTTPSockets().
      • getMaxHTTPSSockets

        java.lang.Integer getMaxHTTPSSockets()
        Returns:
        The maximum number of concurrent connected sockets, which may have carried any kind of Request, used for HTTP over TLS/SSL interaction, reached in the life of the Server. See getCurrentHTTPSSockets().
      • getMaxWSSockets

        java.lang.Integer getMaxWSSockets()
        Returns:
        The maximum number of concurrent connected sockets, managed through the normal WebSocket protocol, reached in the life of the Server. See getCurrentWSSockets().
      • getMaxWSSSockets

        java.lang.Integer getMaxWSSSockets()
        Returns:
        The maximum number of concurrent connected sockets, managed through the WebSocket protocol over TLS/SSL, reached in the life of the Server. See getCurrentWSSSockets().
      • getMaxIdleSockets

        java.lang.Integer getMaxIdleSockets()
        Returns:
        The maximum number of concurrent connected sockets that have been left in an idle state by the client, waiting for a possible reuse. See getCurrentIdleSockets().
      • getMaxHandshakingSockets

        java.lang.Integer getMaxHandshakingSockets()
        Returns:
        The maximum number of concurrent connected sockets performing a TLS/SSL handshake. See getCurrentHandshakingSockets().
      • getCumulConnections

        java.lang.Long getCumulConnections()
        Returns:
        The total (cumulative) number of socket connections performed in the life of the Server.
      • getCumulHTTPConnections

        java.lang.Long getCumulHTTPConnections()
        Returns:
        The total (cumulative) number of socket connections performed in the life of the Server, used for normal HTTP interaction or for upgrade to the WebSocket protocol.
      • getCumulHTTPSConnections

        java.lang.Long getCumulHTTPSConnections()
        Returns:
        The total (cumulative) number of socket connections performed in the life of the Server, used for HTTP over TLS/SSL interaction or for upgrade to the WebSocket protocol over TLS/SSL.
      • getCumulWSUpgrades

        java.lang.Long getCumulWSUpgrades()
        Returns:
        The total (cumulative) number of socket connections upgraded from HTTP to the WebSocket protocol in the life of the Server.
      • getCumulWSSUpgrades

        java.lang.Long getCumulWSSUpgrades()
        Returns:
        The total (cumulative) number of socket connections upgraded from HTTP over TLS/SSL to the WebSocket protocol over TLS/SSL in the life of the Server.
      • getCumulDisconnections

        java.lang.Long getCumulDisconnections()
        Returns:
        The total (cumulative) number of socket connections completed in the life of the Server.
        See Also:
        getCumulConnecionCloseCauses(String)
      • getCumulConnecionCloseCauses

        java.util.Map<java.lang.String,​java.lang.Long> getCumulConnecionCloseCauses​(java.lang.String placeholder)
        Parameters:
        placeholder - Dummy argument that turns the property into an operation and prevents JMX clients from computing the result in a non-interacting way. It can be left null.
        Returns:
        A Map which associates all different causes of connection termination to the number of occurrences of such terminations in the life of the Server. The possible causes are freely determined internally and are represented by a textual description. Causes with no occurrences are not reported.
      • getCumulHandshakesFailed

        java.lang.Long getCumulHandshakesFailed()
        Returns:
        The total (cumulative) number of socket connections terminated because of an interrupted or failed TLS/SSL handshake.
      • getNewConnections

        java.lang.Integer getNewConnections()
        Returns:
        The number of socket connections opened in the last sampling period. They may be carrying any kind of Request, including wrong ones.
      • getNewDisconnections

        java.lang.Integer getNewDisconnections()
        Returns:
        The number of socket connections closed in the last sampling period. They may have carried any kind of Request, including wrong ones.
        See Also:
        getNewConnecionCloseCauses(String)
      • getNewConnecionCloseCauses

        java.util.Map<java.lang.String,​java.lang.Long> getNewConnecionCloseCauses​(java.lang.String placeholder)
        Parameters:
        placeholder - Dummy argument that turns the property into an operation and prevents JMX clients from computing the result in a non-interacting way. It can be left null.
        Returns:
        A Map which associates all different causes of connection termination to the number of occurrences of such terminations in the last sampling period. The possible causes are freely determined internally and are represented by a textual description. Causes with no occurrences are not reported.
      • getNewHandshakesFailed

        java.lang.Integer getNewHandshakesFailed()
        Returns:
        The number of socket connections terminated in the last sampling period because of an interrupted or failed TLS/SSL handshake.
      • getCurrentItemSubscriptions

        java.lang.Integer getCurrentItemSubscriptions()
        Returns:
        The current number of subscriptions currently active for some client. Different subscriptions to the same Item performed by different clients (or even the same client) are reported multiple times in the count. The count includes subscriptions needed to accomplish the Push Notification service.
      • getMaxItemSubscriptions

        java.lang.Integer getMaxItemSubscriptions()
        Returns:
        The maximum number of subscriptions concurrently active reached in the life of the Server. See getCurrentItemSubscriptions().
      • getNewItemSubscriptions

        java.lang.Integer getNewItemSubscriptions()
        Returns:
        The number of subscriptions performed by the clients in the last sampling period. See getCurrentItemSubscriptions().
      • getNewItemUnsubscriptions

        java.lang.Integer getNewItemUnsubscriptions()
        Returns:
        The number of unsubscriptions performed by some client in the last sampling period; this includes unsubscriptions due to session closure. See getCurrentItemSubscriptions().