manager
.
Methods
activateDrainMode
activateDrainMode(
pServerIds,pReason):void
Switches the specified servers into drain mode if not allready done. Applies the reason why to each server. If drain mode is activated, the reason why is shown on the client login screen.
Parameters
string[]An array with server id's, or null for all available servers. You can retrieve the id's via getServerInfos() and then ServerData.getUniqueId(). Please see also method: public String[] extractServerIDs(@Nullable ServerData[] pServerInfos).
string | number | booleanMust not be null. Describes the reason why drain mode is activated.
Returns
voidclearCache
clearCache(
pServerIds):void
Clears the caches for all server.
Parameters
string[]An array with server id's, or null for all available servers. You can retrieve the id's via getServerInfos() and then ServerData.getUniqueId(). Please see also method: public String[] extractServerIDs(@Nullable ServerData[] pServerInfos).
Returns
voidextractServerIDs
extractServerIDs(
pServerInfos):string[]
Extracts the serverId values from the ServerData Array passed in.
Parameters
Returns
string[]always an String Array, eventually with length 0.
getDatabaseInfo
getDatabaseInfo(
pDatabaseId):DatabaseConnectionData
Returns a database connection data object for the specified UID.
Each database object represents one database for a specific alias.
Parameters
string | number | booleanthe UID of the database.
Returns
a DatabaseConnectionData objects representing the requested database, or null if the database does not exit.
Throws
May throw an exception.
getDatabaseInfos
getDatabaseInfos(
pDatabaseIds?):DatabaseConnectionData[]
Returns a list database connection data objects for the specified UIDs.
Each database object represents one database for a specific alias.
Parameters
string[]the UIDs of the databases.
Returns
a list of DatabaseConnectionData objects.
Throws
May throw an exception.
getPeers
getPeers(
pServerIds):PeerData[]
Loads the Peers to a given array of server ids.
Parameters
string[]An array with server id's, or null for all available servers. You can retrieve the id's via getServerInfos() and then ServerData.getUniqueId(). Please see also method: public String[] extractServerIDs(@Nullable ServerData[] pServerInfos).
Returns
An array with Peer Objects, or an array of length zero if no server found.
getServerInfos
getServerInfos(
pServerIds):ServerData[]
Loads the infos to a given array of server ids.
Parameters
string[]An array with server id's, or null for all available servers. You can retrieve the id's via getServerInfos() and then ServerData.getUniqueId(). Please see also method: public String[] extractServerIDs(@Nullable ServerData[] pServerInfos).
Returns
An array with ServerData Objects, or an array of length zero if no server found.
getServerServiceData
getServerServiceData(
serverId):Map<any,any>
Get data of all implemented Services.
Can be accessed by their service names.
Parameters
string | number | booleanServer-ID of the wanted services.
Returns
Map<any, any>Map (String, ServerService) with ServiceName
Example
var services = manager.getServerServiceData();
// Alle Services
logging.log("ANGEMELDETE SERVICES:");
for(var key in services){
logging.log(services[key].getServiceName());
}
//Spezieller Service
logging.log("Status von ServerManager: "+services["ServerManager"].getLastEvent().getState())
getServerServiceDataHistory
getServerServiceDataHistory(
amountOfEntriesPerService):ServerService[]
Liefert den Verlauf der aktuellen Daten zu allen ServerServices.
Parameters
numberdie maximale Anzahl der Einträge pro ServerService
Returns
getServerServiceDataHistorySpan
getServerServiceDataHistorySpan(
startOfHistory,endOfHistory):ServerService[]
Liefert den Verlauf der aktuellen Daten zu allen ServerServices.
Parameters
Datethe Date from which the data is to be returned until the endOfHistory Date
Datethe Date until which the data is to be returned starting with the startOfHistory Date
Returns
getServerServiceHistory
getServerServiceHistory(
serverId,serviceId):Map<any,any>
Liefert die Ereignishistorie für einen Server-Service.
Parameters
string | number | booleanDer Server, der den Service nutzt.
string | number | booleanDer gesuchte Service.
Returns
Map<any, any>Map mit (String: Zeitstempel) -> (Event: Ereignis)
getServerStatistics
getServerStatistics(
pServerId,pStatConstant):Map<any,any>
Returns statistics about the server identified by the first parameter. The second parameter defines the part of statistical informations in the returned map.
Parameters
string | number | booleanidentifies the server. You can retrieve the id via getServerInfos() and then ServerData.getUniqueId(). If null applied, the returned map is empty. Please see also method: public String[] extractServerIDs(@Nullable ServerData[] pServerInfos).
string | number | booleanone of the STAT_XXX constants, or null for all statistical informations. If the String value can not be resolved, an empty map is returned.
Returns
Map<any, any>never null, the map can be empty.
getUserClientInfos
getUserClientInfos(
pSessionIds?):ClientData[]
Loads the infos to a given array of session ids
Parameters
string[]Client Session Ids to load
Returns
List of Client Infos; List is empty if no corresponding data can be found for the given session ids
getVMProperties
getVMProperties(
pServerId):Map<any,any>
Returns the Virtual Machine Properties for the specified server identified by parameter.
Use the key VMPROPERTIES_CLASS_PATH to access the servers class path directly
Parameters
string | number | booleanYou can retrieve the id via getServerInfos() and then ServerData.getUniqueId(). If null applied, the returned map is empty. Please see also method: public String[] extractServerIDs(@Nullable ServerData[] pServerInfos).
Returns
Map<any, any>never null, the map can be empty.
restartServerService
restartServerService(
pServerId,pServiceId,pUserName):boolean
Stoppt einen Server-Service und startet ihn anschließend neu.
Parameters
string | number | booleanServer ID of the service.
string | number | booleanUID of the service.
string | number | booleanCalling user
Returns
booleantrue, wenn Neustart erfolgreich war.
runGarbageCollection
runGarbageCollection(
pServerIds):void
Initiates garbage collection for the specified servers.
Parameters
string[]An array with server id's, or null for all available servers. You can retrieve the id's via getServerInfos() and then ServerData.getUniqueId() Please see also method: public String[] extractServerIDs(@Nullable ServerData[] pServerInfos).
Returns
voidsendMessageByClientInfos
sendMessageByClientInfos(
pMessage,pUserClientData):boolean
Sends a Message to the given User Clients. If backendType is REMOTE the message will be distributed cluster wide
Parameters
string | number | booleanMessage to send
Returns
booleanFalse if an error occurred, True if not
sendMessageBySessionIds
sendMessageBySessionIds(
pMessage,pClientSessionIds):boolean
Sends a Message to the given User Clients. If backendType is REMOTE the message will be distributed cluster wide
Parameters
string | number | booleanMessage to send
string[]User Clients Session Ids to receive the message; null for all Clients
Returns
booleanFalse if an error occurred, True if not
shutdownPeers
shutdownPeers(
pPeerServerIds):void
Shuts down the connection of the peers given by the parameter
Parameters
string[]The server ids of the peers to be shutdown; null for all peers
Returns
voidshutdownUserClients
shutdownUserClients(
pUserClientData):boolean
Logs out the given User Clients If backendType is REMOTE the logout command will be distributed cluster wide
Parameters
Returns
booleanFalse if an error occurred, True if not
startServerService
startServerService(
pServerId,pServiceId,pUserName):boolean
Startet einen Server-Service. Hinweis: Wird eine neue Konfiguration über die Prefences/Alias angelegt, starten der Server-Service evtl. neu, ausser er wurde in der Konfiguration deaktiviert.
Parameters
string | number | booleanServer ID of the service.
string | number | booleanUID of the service.
string | number | booleanCalling user
Returns
booleantrue, wenn Start erfolgreich war.
stopDrainMode
stopDrainMode(
pServerIds):void
Deactivates the drain mode for the specified servers.
Parameters
string[]An array with server id's, or null for all available servers. You can retrieve the id's via getServerInfos() and then ServerData.getUniqueId(). Please see also method: public String[] extractServerIDs(@Nullable ServerData[] pServerInfos).
Returns
voidstopServerService
stopServerService(
pServerId,pServiceId,pUserName):boolean
Stoppt einen Server Service.
Parameters
string | number | booleanServer ID of the service.
string | number | booleanUID of the service.
string | number | booleanCalling user
Returns
booleantrue, wenn Stop erfolgreich war.
Properties
STAT_CPU
stringThe key for statistical informations about the CPU usage of this server
STAT_DEFAULT
stringThe key for statistical informations about the server himself
STAT_MEMORY
stringThe key for statistical informations about the memory usage of this server
STAT_PATH
stringThe key for informations about the paths used by this server
VMPROPERTIES_CLASS_PATH
stringThe key to get a servers class path from the manager.getVMProperties() map