public class DefaultServerAdmin extends UnicastRemoteObject implements ServerAdmin
ServerAdmin.GcEvent, ServerAdmin.ServerStatistics, ServerAdmin.ThreadStatistics
ref
Constructor and Description |
---|
DefaultServerAdmin(AbstractServer<?,? extends ServerAdmin> server,
ServerConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
long |
allocatedMemory() |
Collection<RemoteClient> |
clients() |
Collection<RemoteClient> |
clients(String clientTypeId) |
Collection<RemoteClient> |
clients(User user) |
Collection<String> |
clientTypes() |
int |
connectionCount() |
void |
disconnect(UUID clientId)
Unregisters the connection from the server, if connection pooling is enabled
for the user the connection is pooled.
|
List<ServerAdmin.GcEvent> |
gcEvents(long since) |
int |
getConnectionLimit() |
long |
maxMemory() |
double |
processCpuLoad() |
int |
requestsPerSecond() |
ServerInformation |
serverInformation() |
ServerAdmin.ServerStatistics |
serverStatistics(long since) |
void |
setConnectionLimit(int value) |
void |
shutdown()
Shuts down the server
|
double |
systemCpuLoad() |
String |
systemProperties() |
ServerAdmin.ThreadStatistics |
threadStatistics() |
long |
usedMemory() |
Collection<User> |
users() |
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
public DefaultServerAdmin(AbstractServer<?,? extends ServerAdmin> server, ServerConfiguration configuration) throws RemoteException
RemoteException
public final ServerInformation serverInformation()
serverInformation
in interface ServerAdmin
public final String systemProperties()
systemProperties
in interface ServerAdmin
public final List<ServerAdmin.GcEvent> gcEvents(long since)
gcEvents
in interface ServerAdmin
since
- the time since from which to get gc eventspublic final ServerAdmin.ThreadStatistics threadStatistics() throws RemoteException
threadStatistics
in interface ServerAdmin
RemoteException
- in case of an exceptionpublic final Collection<User> users() throws RemoteException
users
in interface ServerAdmin
RemoteException
- in case of a communication errorpublic final Collection<RemoteClient> clients(User user) throws RemoteException
clients
in interface ServerAdmin
user
- the user for which to retrieve the clientsRemoteException
- in case of a communication errorpublic final Collection<RemoteClient> clients(String clientTypeId)
clients
in interface ServerAdmin
clientTypeId
- the client type for which to retrieve the clientspublic final Collection<RemoteClient> clients()
clients
in interface ServerAdmin
public final Collection<String> clientTypes()
clientTypes
in interface ServerAdmin
public final void disconnect(UUID clientId) throws RemoteException
ServerAdmin
disconnect
in interface ServerAdmin
clientId
- the id of the clientRemoteException
- in case of a communication errorpublic final void shutdown() throws RemoteException
ServerAdmin
shutdown
in interface ServerAdmin
RemoteException
- in case of a communication errorpublic int requestsPerSecond()
requestsPerSecond
in interface ServerAdmin
public final ServerAdmin.ServerStatistics serverStatistics(long since) throws RemoteException
serverStatistics
in interface ServerAdmin
since
- the time since from which to retrieve statisticsRemoteException
- in case of an exceptionpublic final long allocatedMemory()
allocatedMemory
in interface ServerAdmin
public final long usedMemory()
usedMemory
in interface ServerAdmin
public final long maxMemory()
maxMemory
in interface ServerAdmin
public final double systemCpuLoad() throws RemoteException
systemCpuLoad
in interface ServerAdmin
RemoteException
- in case of a communication errorOperatingSystemMXBean.getSystemCpuLoad()
public final double processCpuLoad() throws RemoteException
processCpuLoad
in interface ServerAdmin
RemoteException
- in case of a communication errorOperatingSystemMXBean.getProcessCpuLoad()
public final int connectionCount()
connectionCount
in interface ServerAdmin
public final int getConnectionLimit()
getConnectionLimit
in interface ServerAdmin
public final void setConnectionLimit(int value)
setConnectionLimit
in interface ServerAdmin
value
- the maximum number of concurrent connections this server accepts