com.lightstreamer.jmx
Interface ServerMBean


public interface ServerMBean

One ServerMBean instance exists in the system. It is created at startup by Lightstreamer Server and lasts until the shutdown of the Server.

ServerMBean name:
"com.lightstreamer:type=Server"


Method Summary
 java.lang.Boolean block()
          Stop accepting new Stream or Polling Connections but do not disconnect current Users.
 java.lang.Boolean disableHostname(java.lang.String hostname)
          Disconnect all the Users currently connected from the specified host or domain and stop accepting new Connections from that address.
 java.lang.Boolean disableIP(java.lang.String ip)
          Disconnect all the Users currently connected from the specified IP address and stop accepting new Connections from that IP.
 java.lang.Boolean enableHostname(java.lang.String hostname)
          Remove the ban associated to the specified host or domain.
 java.lang.Boolean enableIP(java.lang.String ip)
          Remove the ban associated to the specified IP address.
 java.lang.String getConfigFile()
          [TO BE IMPLEMENTED]
 java.util.List getDisabledHostnamesList()
           
 java.util.List getDisabledIPsList()
           
 java.lang.Long getFreeMemory()
           
 java.lang.String getJavaVersion()
           
 java.util.Date getLastRefreshTime()
           
 java.lang.String getLocalHostIP()
           
 java.lang.String getLocalHostname()
           
 java.lang.String getLSClientId()
           
 java.lang.String getLSEdition()
           
 java.lang.String getLSLicenseType()
           
 java.lang.String getLSVersion()
           
 java.lang.Integer getMaxSessions()
           
 java.lang.Integer getSamplingPeriodMillis()
           
 java.util.Date getStartupTime()
           
 java.lang.String getStatus()
           
 java.lang.Long getTotalMemory()
           
 java.lang.Long getUptimeMillis()
           
 void setMaxSessions(java.lang.Integer sessions)
           
 void shutdown()
          Terminate the Server operations and exit JVM.
 java.lang.Boolean start()
          Start accepting new Connections.
 java.lang.Boolean stop()
          [TO BE IMPLEMENTED] Stop accepting new Connections and disconnect all connected Users.
 

Method Detail

getTotalMemory

java.lang.Long getTotalMemory()
Returns:
The total memory (expressed in Bytes) allocated for the heap.

getFreeMemory

java.lang.Long getFreeMemory()
Returns:
The free memory (expressed in Bytes) in the heap.

getJavaVersion

java.lang.String getJavaVersion()
Returns:
The version of the Java virtual machine.

getUptimeMillis

java.lang.Long getUptimeMillis()
Returns:
The time (expressed in milliseconds) passed since Lightstreamer Server has been started up.

getStartupTime

java.util.Date getStartupTime()
Returns:
The timestamp of Lightstreamer Server startup.

getLSVersion

java.lang.String getLSVersion()
Returns:
The version of Lightstreamer Server.

getLSEdition

java.lang.String getLSEdition()
Returns:
The edition in which Lightstreamer Server is running.
Edition Note:
JMX manageability is not allowed at all in Presto edition.
Edition Note:
JMX manageability is not allowed at all in Allegro edition.
Edition Note:
JMX manageability is not allowed at all in Moderato edition.

getLSLicenseType

java.lang.String getLSLicenseType()
Returns:
The license type used to run Lightstreamer Server: "TRIAL" or "PRODUCTION".

getLSClientId

java.lang.String getLSClientId()
Returns:
The client id of the license used to run Lightstreamer Server. Only the starting 4 characters are returned.

getLocalHostIP

java.lang.String getLocalHostIP()
Returns:
The local IP address of the host running Lightstreamer Server.

getLocalHostname

java.lang.String getLocalHostname()
Returns:
The local hostname of the host running Lightstreamer Server.

getStatus

java.lang.String getStatus()
Returns:
The status of the server: "Initializing", "Running", "Stopped", "Blocked".

shutdown

void shutdown()
Terminate the Server operations and exit JVM.


stop

java.lang.Boolean stop()
[TO BE IMPLEMENTED] Stop accepting new Connections and disconnect all connected Users. The process stays alive.

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

block

java.lang.Boolean block()
Stop accepting new Stream or Polling Connections but do not disconnect current Users. The process stays alive.

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

start

java.lang.Boolean start()
Start accepting new Connections. Called to switch from "Stopped" and "Blocked" mode to "Running" mode.

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

disableIP

java.lang.Boolean disableIP(java.lang.String ip)
Disconnect all the Users currently connected from the specified IP address and stop accepting new Connections from that IP.

Parameters:
ip - an IP address.
Returns:
True if operation succeded. False if operation failed.

enableIP

java.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 succeded. False if operation failed.

getDisabledIPsList

java.util.List getDisabledIPsList()
Returns:
The list of all banned IP addresses. Expressed as an ArrayList of Strings, where each String contains an IP address.

disableHostname

java.lang.Boolean disableHostname(java.lang.String hostname)
Disconnect all the Users currently connected from the specified host or domain and stop accepting new Connections from that address.

Parameters:
hostname - a host name.
Returns:
True if operation succeded. False if operation failed.

enableHostname

java.lang.Boolean enableHostname(java.lang.String hostname)
Remove the ban associated to the specified host or domain.

Parameters:
hostname - a host name.
Returns:
True if operation succeded. False if operation failed.

getDisabledHostnamesList

java.util.List 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.

getMaxSessions

java.lang.Integer getMaxSessions()
Returns:
The maximum allowed number of concurrent Sessions (Clients). a 0 value indicates an unlimted number of Sessions.

setMaxSessions

void setMaxSessions(java.lang.Integer sessions)
Parameters:
sessions - The maximum allowed number of concurrent Sessions (Clients). 0 is used to indicate an unlimted number of Sessions. The new limit does not affect currently active sessions.

getSamplingPeriodMillis

java.lang.Integer getSamplingPeriodMillis()
Returns:
The duration of the sampling period (used for statistical attributes for all the MBeans of Lightstreamer).

getLastRefreshTime

java.util.Date getLastRefreshTime()
Returns:
The time of the last refresh of sampled attributes (used for statistical attributes for all the MBeans of Lightstreamer).

getConfigFile

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

Returns:
The XML configuration file of Lightstreamer Server.