Interface ServerSocketMBean


  • public interface ServerSocketMBean
    Multiple ServerSocketMBean instances exist in the system, where each one is related to one configured "Server" instance (that is, listening port). Every <http_server> and <https_server> element in the configuration file is bound to one ServerSocketMBean instance. Each ServerSocketMBean instance is created at startup by Lightstreamer Server and lasts until the shutdown of the Server. Remote JMX clients should not deregister ServerSocketMBean instances.

    ServerSocketMBean name pattern when the listening interface is not configured:
    "com.lightstreamer:type=ServerSocket,Port=<ConfiguredPort>"

    ServerSocketMBean name pattern when the listening interface is configured:
    "com.lightstreamer:type=ServerSocket,Port=<ConfiguredPort>,Interface=<ConfiguredInterface>"

    Where the ConfiguredPort and ConfiguredInterface refer to the values supplied in the related <http_server> or <https_server> block.
    • Method Detail

      • getServerName

        java.lang.String getServerName()
        Returns:
        The name of the server socket, as configured through the "name" attribute.
      • getLocalInterface

        java.lang.String getLocalInterface()
        Returns:
        The configured value for the local interface IP address on this server socket, or null if no configuration has been supplied.
      • getLocalPort

        java.lang.Integer getLocalPort()
        Returns:
        The local port where this server socket is listening.
      • getIsSSL

        java.lang.Boolean getIsSSL()
        Returns:
        true if the server socket is for https connections.
      • getCurrentSockets

        java.lang.Integer getCurrentSockets()
        Returns:
        The number of currently connected sockets opened on this server socket. 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 opened on this server socket, 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 opened on this server socket, 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, opened on this server socket. 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, opened on this server socket. 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, opened on this server socket, 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, opened on this server socket, 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, opened on this server socket, reached in the life of the Server. See getCurrentSockets().
      • getMaxHTTPSockets

        java.lang.Integer getMaxHTTPSockets()
        Returns:
        The maximum number of concurrent connected sockets, opened on this server socket, 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, opened on this server socket, 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, opened on this server socket, 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, opened on this server socket, 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, opened on this server socket, 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, opened on this server socket, performing a TLS/SSL handshake. See getCurrentHandshakingSockets().
      • getCumulConnections

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

        java.lang.Long getCumulHTTPConnections()
        Returns:
        The total (cumulative) number of socket connections, opened on this server socket, 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, opened on this server socket, 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, opened on this server socket, 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, opened on this server socket, 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, opened on this server socket, 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, with regard to connections opened on this server socket. 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, opened on this server socket, terminated because of an interrupted or failed TLS/SSL handshake.
      • getNewConnections

        java.lang.Integer getNewConnections()
        Returns:
        The number of socket connections opened on this server socket in the last sampling period.
      • getNewDisconnections

        java.lang.Integer getNewDisconnections()
        Returns:
        The number of socket connections, opened on this server socket, closed in the last sampling period.
        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, with regard to connections opened on this server socket. 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, opened on this server socket, terminated in the last sampling period because of an interrupted or failed TLS/SSL handshake.
      • getCumulAcceptPauseMillis

        java.lang.Long getCumulAcceptPauseMillis()
        Returns:
        The total time in which the Server has paused, keeping from accepting new socket connections on this server socket, in the life of the Server. The Server may pause in case of unexpected errors or because of the configured pool queue limits.
      • getNewAcceptPauseMillis

        java.lang.Long getNewAcceptPauseMillis()
        Returns:
        The time in which the Server has paused, keeping from accepting new socket connections on this server socket, during the last sampling period. The Server may pause in case of unexpected errors or because of the configured pool queue limits.