Package com.lightstreamer.jmx
Interface ServerMBean
- 
 public interface ServerMBeanOne ServerMBean instance exists in the system, to provide general information and operations on the Server. It is created at startup by Lightstreamer Server and lasts until the shutdown of the Server.
 
 ServerMBean name:
 "com.lightstreamer:type=Server"
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.Booleanblock(java.lang.Boolean forceRetry)Stop accepting new Requests for opening new Sessions, but keep serving currently active Sessions and accept any Requests related to these Sessions.java.lang.BooleandisableHostname(java.lang.String hostname)Ban a specified host or domain name.java.lang.BooleandisableIP(java.lang.String ip)Ban a specified IP address.java.lang.BooleandrainSessions(java.lang.Double secondRate)Starts a background activity to close all sessions at a desired rate.java.lang.BooleanenableHostname(java.lang.String hostname)Remove the ban associated to the specified host or domain name.java.lang.BooleanenableIP(java.lang.String ip)Remove the ban associated to the specified IP address.java.util.Map<java.lang.String,java.lang.String>getConfigAsProperties(java.lang.String filter)java.lang.StringgetConfigFile(java.lang.String placeholder)java.lang.LonggetCumulAcceptPauseMillis()java.util.List<java.lang.String>getDisabledHostnamesList()java.util.List<java.lang.String>getDisabledIPsList()java.util.Map<java.lang.String,java.lang.String>getEditionConfigAsProperties(java.lang.String filter)java.lang.StringgetEditionConfigFile(java.lang.String placeholder)java.lang.LonggetFreeMemory()java.lang.StringgetJavaVersion()java.util.DategetLastRefreshTime()java.lang.StringgetLocalHostIP()java.lang.StringgetLocalHostname()java.lang.StringgetLSClientId()java.lang.StringgetLSEdition()java.lang.StringgetLSLicenseType()java.lang.StringgetLSVersion()java.lang.IntegergetMaxMPNDevices()java.lang.IntegergetMaxSessions()java.lang.LonggetNewAcceptPauseMillis()java.lang.IntegergetSamplingPeriodMillis()java.util.DategetStartupTime()java.lang.StringgetStatus()java.lang.LonggetTotalMemory()java.lang.LonggetUptimeMillis()java.util.Map<java.lang.String,java.lang.String>getVersionConfigAsProperties(java.lang.String filter)Deprecated.You should use the new getEditionConfigAsProperties method.java.lang.StringgetVersionConfigFile(java.lang.String placeholder)Deprecated.You should use the new getEditionConfigFile method.voidsetMaxMPNDevices(java.lang.Integer devices)voidsetMaxSessions(java.lang.Integer sessions)voidshutdown()Terminate the Server operations and exit JVM.java.lang.Booleanstart()Start accepting new Connections and Requests of any type.java.lang.Booleanstop()Close all Connections, of any type, and stop accepting Connections of any type from any client.
 
- 
- 
- 
Method Detail- 
getTotalMemoryjava.lang.Long getTotalMemory() - Returns:
- The total memory (expressed in Bytes) allocated for the heap.
 
 - 
getFreeMemoryjava.lang.Long getFreeMemory() - Returns:
- The free memory (expressed in Bytes) in the heap.
 
 - 
getJavaVersionjava.lang.String getJavaVersion() - Returns:
- The version of the Java virtual machine.
 
 - 
getUptimeMillisjava.lang.Long getUptimeMillis() - Returns:
- The time (expressed in milliseconds) passed since Lightstreamer Server has been started up.
 
 - 
getStartupTimejava.util.Date getStartupTime() - Returns:
- The timestamp of Lightstreamer Server startup.
 
 - 
getLSVersionjava.lang.String getLSVersion() - Returns:
- The version of Lightstreamer Server.
 
 - 
getLSEditionjava.lang.String getLSEdition() - Returns:
- The edition in which Lightstreamer Server is running, can be one of the following:
 - COMMUNITY
 - ENTERPRISE
 
 - 
getLSLicenseTypejava.lang.String getLSLicenseType() - Returns:
- The license type used to run Lightstreamer Server, can be one of the following:
 - DEMO
 - EVALUATION
 - STARTUP
 - NON-PRODUCTION-LIMITED
 - NON-PRODUCTION-FULL
 - PRODUCTION
 - HOT-STANDBY
 - FREE
 
 - 
getLSClientIdjava.lang.String getLSClientId() - Returns:
- The client id of the license used to run Lightstreamer Server. For a DEMO license type, "-" is returned.
 
 - 
getLocalHostIPjava.lang.String getLocalHostIP() - Returns:
- The local IP address of the host running Lightstreamer Server.
 
 - 
getLocalHostnamejava.lang.String getLocalHostname() - Returns:
- The local hostname of the host running Lightstreamer Server.
 
 - 
getStatusjava.lang.String getStatus() - Returns:
- The status of the server with respect to support for client requests.
 It can be "Initializing", "Running", "Stopped", or "Blocked";
 moreover, if a draining activity requested through drainSessions(Double)is in place, it is also reported.
 
 - 
getCumulAcceptPauseMillisjava.lang.Long getCumulAcceptPauseMillis() - Returns:
- The total time in which the Server has paused, keeping from accepting new socket connections, in the life of the Server. The Server may pause in case of unexpected errors or because of the configured pool queue limits. The time is aggregated over all server socket ports (hence, in principle, it can be greater than the total uptime itself).
 
 - 
getNewAcceptPauseMillisjava.lang.Long getNewAcceptPauseMillis() - Returns:
- The time in which the Server has paused, keeping from accepting new socket connections, during the last sampling period. The Server may pause in case of unexpected errors or because of the configured pool queue limits. The time is aggregated over all server socket ports (hence, it can be greater than the sampling period itself).
 
 - 
shutdownvoid shutdown() Terminate the Server operations and exit JVM.
 - 
stopjava.lang.Boolean stop() Close all Connections, of any type, and stop accepting Connections of any type from any client. This will cause all the currently active Sessions to terminate, with no cause notification to the clients. Incoming Connection attempts will be accepted and logged, then immediately closed. The process stays alive.
 WARNING If you stop the Server from JMX Tree, you will not be able to start it again from JMX Tree itself, but from a JMX client, like JConsole.- Returns:
- True if operation succeeded. False if operation failed.
 
 - 
blockjava.lang.Boolean block(java.lang.Boolean forceRetry) Stop accepting new Requests for opening new Sessions, but keep serving currently active Sessions and accept any Requests related to these Sessions. Requests on ports declared as "priority ports" will not be affected. Also requests to the Internal Web Server, like all JMX Tree activity, will still be allowed.- Parameters:
- forceRetry- If true, the client will be asked to try a reconnection; this makes sense only in a clustering scenario; otherwise the client will be asked to keep from retrying.
- Returns:
- True if operation succeeded. False if operation failed.
 
 - 
drainSessionsjava.lang.Boolean drainSessions(java.lang.Double secondRate) Starts a background activity to close all sessions at a desired rate. If such an activity is already in place, it will be replaced. The sessions will be closed one at a time. Since session close involves invocations to the Metadata Adapter, which may introduce delays, the actual rate of closes may be lower than requested. Sessions logged to the Internal Monitor Adapter Set are not affected.
 This invocation is meant to force rebalancing in a clustering scenario, hence the clients will be asked to try a reconnection. If new connections on this instance have to be prevented,block(Boolean)can be called first.- Parameters:
- secondRate- The desired rate of sessions to be closed per second. Rates from 1/1000 to 1 million per second are supported.
- Returns:
- True if operation succeeded. False if operation failed.
- See Also:
- start()
 
 - 
startjava.lang.Boolean start() Start accepting new Connections and Requests of any type. Called to switch from "Stopped" and "Blocked" mode to "Running" mode. Any pending draining activity requested throughdrainSessions(Double)will also be interrupted.- Returns:
- True if operation succeeded. False if operation failed.
 
 - 
disableIPjava.lang.Boolean disableIP(java.lang.String ip) Ban a specified IP address. Close all Connections, of any type, and stop accepting Connections of any type from clients connected from this IP address. This will cause the Sessions related with those clients to terminate, with no cause notification to the clients. Incoming Connection attempts from the banned IP will be accepted and logged, then immediately closed.- Parameters:
- ip- an IP address.
- Returns:
- True if operation succeeded. False if operation failed.
 
 - 
enableIPjava.lang.Boolean enableIP(java.lang.String ip) Remove the ban associated to the specified IP address.- Parameters:
- ip- an IP address.
- Returns:
- True if operation succeeded. False if operation failed.
 
 - 
getDisabledIPsListjava.util.List<java.lang.String> getDisabledIPsList() - Returns:
- The list of all banned IP addresses. Expressed as an ArrayList of Strings, where each String contains an IP address.
 
 - 
disableHostnamejava.lang.Boolean disableHostname(java.lang.String hostname) Ban a specified host or domain name. Close all Connections, of any type, and stop accepting Connections of any type from clients connected from this host or domain. This will cause the Sessions related with those clients to terminate, with no cause notification to the clients. Incoming Connection attempts from the banned host/domain will be accepted and logged, then immediately closed.- Parameters:
- hostname- a host or domain name.
- Returns:
- True if operation succeeded. False if operation failed.
 
 - 
enableHostnamejava.lang.Boolean enableHostname(java.lang.String hostname) Remove the ban associated to the specified host or domain name.- Parameters:
- hostname- a host or domain name.
- Returns:
- True if operation succeeded. False if operation failed.
 
 - 
getDisabledHostnamesListjava.util.List<java.lang.String> getDisabledHostnamesList() - Returns:
- The list of all banned host or domain names. Expressed as an ArrayList of Strings, where each String contains a host/domain name.
 
 - 
getMaxSessionsjava.lang.Integer getMaxSessions() - Returns:
- The maximum allowed number of concurrent Sessions (Clients).
         a 0 value indicates an unlimited number of Sessions.
         As long as sessions are in "prestarted" state, they don't concur
         to the overall count; sessions that are in "prestarted" state
         while the limit is exceeded are kept, but they may get closed
         upon the first attempt to use them. 
 This setting corresponds to the <max_sessions> configuration setting.
 Note that further restrictions may be posed by license terms.
 
 - 
setMaxSessionsvoid setMaxSessions(java.lang.Integer sessions) - Parameters:
- sessions- The maximum allowed number of concurrent Sessions (Clients). 0 is used to indicate an unlimited number of Sessions. This setting overrides the <max_sessions> configuration setting. Setting a limit which is lower than the current number of active sessions does not affect these sessions in any way.
- See Also:
- getMaxSessions()
 
 - 
getMaxMPNDevicesjava.lang.Integer getMaxMPNDevices() - Returns:
- The maximum allowed number of concurrent MPN Devices served
         by the Push Notification service in this Server instance.
         A 0 value indicates an unlimited number of MPN Devices.
         This setting corresponds to the <max_mpn_devices> configuration
         setting. 
 It is null if the internal MPN Module is not enabled. Note that further restrictions may be posed by license terms.
- See Also:
- PushNotificationsMBean.getCurrentMPNDevices()
- Unavailability Note:
- MPN is currently not available.
 
 - 
setMaxMPNDevicesvoid setMaxMPNDevices(java.lang.Integer devices) - Parameters:
- devices- The maximum allowed number of concurrent MPN Devices being served by the Push Notification service in this Server instance. 0 is used to indicate an unlimited number of MPN Devices. This setting overrides the <max_mpn_devices> configuration setting. Setting a limit which is lower than the number of MPN Devices currently served does not affect these Devices in any way. The setting is ignored if the internal MPN Module is not enabled.
- See Also:
- PushNotificationsMBean.getCurrentMPNDevices()
- Unavailability Note:
- MPN is currently not available.
 
 - 
getSamplingPeriodMillisjava.lang.Integer getSamplingPeriodMillis() - Returns:
- The duration of the sampling period (used for statistical attributes for all the MBeans of Lightstreamer).
 
 - 
getLastRefreshTimejava.util.Date getLastRefreshTime() - Returns:
- The time of the last refresh of sampled attributes (used for statistical attributes for all the MBeans of Lightstreamer).
 
 - 
getConfigFilejava.lang.String getConfigFile(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:
- The contents of the Server XML configuration file, as read at Server startup.
 
 - 
getVersionConfigFile@Deprecated java.lang.String getVersionConfigFile(java.lang.String placeholder) Deprecated.You should use the new getEditionConfigFile method.- 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:
- The contents of the Server XML edition configuration file, as read at Server startup.
 
 - 
getEditionConfigFilejava.lang.String getEditionConfigFile(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:
- The contents of the Server XML edition configuration file, as read at Server startup.
 
 - 
getConfigAsPropertiesjava.util.Map<java.lang.String,java.lang.String> getConfigAsProperties(java.lang.String filter) - Parameters:
- filter- A text to be used as a filter for property names, or null if no filtering is needed.
- Returns:
- The contents of the Server XML configuration file, as actually
         used by the Server for its own configuration needs;
         in particular, only nonempty elements are reported, as empty
         elements are ignored by the Server.
         If a filtering text is supplied, then a proper subset is returned.
         The return value is a key-value Map alphabetically ordered.
         Note that the key values follow an internal naming convention,
         by which:
         - subelements are represented as dot-separated compound names;
- attributes are represented within parenthesis;
- multiple instances of the same elements are distinguished through a trailing progressive.
 
 
 - 
getVersionConfigAsProperties@Deprecated java.util.Map<java.lang.String,java.lang.String> getVersionConfigAsProperties(java.lang.String filter) Deprecated.You should use the new getEditionConfigAsProperties method.- Parameters:
- filter- A text to be used as a filter for property names, or null if no filtering is needed.
- Returns:
- The contents of the Server XML edition configuration file,
         as actually used by the Server for its own configuration needs;
         in particular, only nonempty elements are reported, as empty
         elements are ignored by the Server.
         If a filtering text is supplied, then a proper subset is returned.
         The return value is a key-value Map alphabetically ordered.
         Note that the key values follow an internal naming convention,
         by which:
         - subelements are represented as dot-separated compound names;
- attributes are represented within parenthesis;
- multiple instances of the same elements are distinguished through a trailing progressive.
 
 
 - 
getEditionConfigAsPropertiesjava.util.Map<java.lang.String,java.lang.String> getEditionConfigAsProperties(java.lang.String filter) - Parameters:
- filter- A text to be used as a filter for property names, or null if no filtering is needed.
- Returns:
- The contents of the Server XML edition configuration file,
         as actually used by the Server for its own configuration needs;
         in particular, only nonempty elements are reported, as empty
         elements are ignored by the Server.
         If a filtering text is supplied, then a proper subset is returned.
         The return value is a key-value Map alphabetically ordered.
         Note that the key values follow an internal naming convention,
         by which:
         - subelements are represented as dot-separated compound names;
- attributes are represented within parenthesis;
- multiple instances of the same elements are distinguished through a trailing progressive.
 
 
 
- 
 
-