Page History
The maintenance
plugin
The maintenance
plugin is a new plugin available since the 4.2 version of Servoy. It allows you to automatically perform administrative tasks, like:
...
Function | isInMaintenanceMode | |||||
---|---|---|---|---|---|---|
Description | Returns true if the server is in maintenance mode, false otherwise. | |||||
Example |
| |||||
Function | setMaintenanceMode | |||||
Description | Puts the server into/out of maintenance mode, depending on the boolean parameter that is specified (if the parameter is true, then the server will be put into maintenance mode; if the parameter is false, then the server will be put out of maintenance mode). | |||||
Example |
| |||||
Function | getConnectedClients | |||||
Description | Returns an array of IClientInformation elements describing the clients connected to the server. | |||||
Example |
| |||||
Function | sendMessageToAllClients | |||||
Description | Sends a message to all connected clients. | |||||
Example |
| |||||
Function | sendMessageToClient | |||||
Description | Sends a message to a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method. | |||||
Example |
| |||||
Function | shutDownAllClients | |||||
Description | Shuts down all connected clients[i].getHostAddress() + "'.");. | |||||
Example |
| |||||
Function | shutDownClient | |||||
Description | Shuts down a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method. | |||||
Example |
| |||||
Function | getServer | |||||
Description | Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument. If the optional argument "mustBeEnabled" is set to true, then the JSServer instance is returned only if the server is active. Similarly, if the "mustBeValid" optional argument is set to true, then the JSServer instance is returned only if the server is valid. If the specified server is not found, or if it does not meet the requirements imposed by the optional arguments, then null is returned. By default both optional arguments have the value false. | |||||
Example |
| |||||
Function | getServerNames | |||||
Description | Retrieves a list with the names of all available database servers. The returned list will contain only enabled servers if the "mustBeEnabled" optional argument is set to true. The list will contain only valid servers if the "mustBeValid" argument is set to true. If the "sort" optional argument is set to true, then the list will be sorted alphabetically. If the "includeDuplicates" optional argument is set to false, then duplicate servers will appear only once in the list. By default, the "mustBeEnabled" and the "mustBeValid" arguments have the value false, while the "sort" and "includeDuplicates" arguments have the value true. | |||||
Example |
|