OpenPetra
Free Administration Software for Non-Profits
|
some common implementations for IServerAdminInterface More...
Public Member Functions | |
TServerManagerBase () | |
Initialises Logging and parses Server settings from different sources. More... | |
void | HookupProperShutdownProcessing () |
Ensures Logging and an 'ordered cooperative shutdown' in case an Unhandled Exception is thrown in Threads, ThreadPool work items or Finalizers anywhere in the PetraServer. More... | |
bool | StopServerControlled (bool AForceAutomaticClosing) |
Stops the Petra Server in a more controlled way than the StopServer Method. More... | |
void | StopServer () |
Stops the Petra Server. A GC is invoked and waits for pending tasks before the application ends. More... | |
bool | DisconnectClient (System.Int16 AClientID, out String ACantDisconnectReason) |
Requests disconnection of a certain Client from the Petra Server. More... | |
bool | QueueClientTask (System.Int16 AClientID, String ATaskGroup, String ATaskCode, object ATaskParameter1, object ATaskParameter2, object ATaskParameter3, object ATaskParameter4, System.Int16 ATaskPriority) |
Queues a ClientTask for a certain Client. More... | |
String | FormatClientList (Boolean AListDisconnectedClients) |
Formats the client list array for output in a fixed-width font (eg. to the Console) More... | |
String | FormatClientListSysadm (Boolean AListDisconnectedClients) |
Formats the client list array for output in the sysadm dialog for selection of a client id More... | |
System.Int64 | PerformGC () |
Performs a GarbageCollection on the Server. More... | |
virtual bool | UpgradeDatabase () |
upgrade the database More... | |
virtual string | BackupDatabaseToYmlGZ () |
BackupDatabaseToYmlGZ More... | |
virtual bool | RestoreDatabaseFromYmlGZ (string AYmlGzData) |
RestoreDatabaseFromYmlGZ More... | |
virtual void | RefreshAllCachedTables () |
Marks all DataTables in the Cache to be no longer up-to-date (=out of sync with the data that was originally placed in the DataTable). More... | |
virtual int | ClearConnectionPoolAndGetNumberOfDBConnections () |
Clears (flushes) all RDMBS Connection Pools and returns the new number of DB Connections after clearing all RDMBS Connection Pools. More... | |
virtual bool | SetPassword (string AUserID, string APassword) |
SetPassword More... | |
virtual bool | LockSysadmin () |
LockSysadmin More... | |
virtual bool | AddUser (string AUserId, string APassword="") |
AddUser More... | |
virtual int | ListGpgKeys (out string List) |
Lists the GPG keys for the Intranet server that are available to the Petra Server. More... | |
virtual int | ImportGpgKeys (out string List) |
Imports the GPG encryption keys for the Intranet server. More... | |
virtual void | PerformTimedProcessingNow (string AProcessName) |
Allows the server or admin console to run a timed job More... | |
virtual bool | TimedProcessingJobEnabled (string AProcessName) |
Is the process job enabled? More... | |
Static Public Member Functions | |
static void | ResetStaticVariables () |
reset the static variables for each Web Request call. More... | |
static bool | CheckServerAdminToken (string AServerAdminToken) |
check if a file with this security token exists More... | |
Static Public Attributes | |
static IServerAdminInterface | TheServerManager = null |
static: only initialised once for the whole server More... | |
Static Protected Attributes | |
static Int64 | FDBReconnectionAttemptsCounter = -1 |
DB Reconnection attempts (-1 = no connection established yet at all; 0 = none are being made). More... | |
static bool | FServerTimedProcessingSetup = false |
Whether the Timed Processing has been set up already. More... | |
Properties | |
Int64 | DBReconnectionAttemptsCounter [get, set] |
DB Reconnection attempts (-1 = no connection established yet at all; 0 = none are being made). More... | |
Int64 | SiteKey [get] |
SiteKey of the OpenPetra DB that the Server is connected to. More... | |
int | ClientsConnected [get] |
Number of Clients that are currently connected to the Petra Server. More... | |
bool | ServerTimedProcessingSetup [get] |
Whether the 'Server Timed Processing' has been set up. More... | |
int | ClientsConnectedTotal [get] |
Total number of Clients that connected to the Petra Server since the start of the Petra Server More... | |
ArrayList | ClientList [get] |
Array that contains information about the Clients that are currently connected to the Petra Server. More... | |
ArrayList | ClientListDisconnected [get] |
Array that contains information about the Clients that are currently connected to the Petra Server. More... | |
int | IPPort [get] |
Server setting: IP Port that the Server listens for .NET Remoting calls More... | |
String | ConfigurationFileName [get] |
Server setting: Name of the Server configuration file More... | |
String | ServerInfoVersion [get] |
Version of the Petra Server and operating system on which the Server runs More... | |
String | ServerInfoState [get] |
State of the Server More... | |
System.Int64 | ServerInfoMemory [get] |
Result of a call to GC.GetTotalMemory More... | |
virtual string | TimedProcessingDailyStartTime24Hrs [get] |
the daily start time for the timed processing More... | |
some common implementations for IServerAdminInterface
|
inline |
Initialises Logging and parses Server settings from different sources.
|
inlinevirtual |
AddUser
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
Reimplemented in Ict.Petra.Server.App.Core.TServerManager.
|
inlinevirtual |
BackupDatabaseToYmlGZ
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
Reimplemented in Ict.Petra.Server.App.Core.TServerManager.
|
inlinestatic |
check if a file with this security token exists
|
inlinevirtual |
Clears (flushes) all RDMBS Connection Pools and returns the new number of DB Connections after clearing all RDMBS Connection Pools.
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
inline |
Requests disconnection of a certain Client from the Petra Server.
AClientID | Server-assigned ID of the Client |
ACantDisconnectReason | Reason why the Client cannot be disconnected |
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
inline |
Formats the client list array for output in a fixed-width font (eg. to the Console)
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
inline |
Formats the client list array for output in the sysadm dialog for selection of a client id
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
inline |
Ensures Logging and an 'ordered cooperative shutdown' in case an Unhandled Exception is thrown in Threads, ThreadPool work items or Finalizers anywhere in the PetraServer.
Ensures proper handling of the mentioned situations which were non-fatal to the PetraServer Process in .NET 1.1, but are fatal with .NET 2.0 (also true when running on mono)!
See http://msdn.microsoft.com/en-us/netframework/aa497241.aspx (Text block with Short Desciption 'Unhandled Exceptions will always be fatal to a process').
|
inlinevirtual |
Imports the GPG encryption keys for the Intranet server.
List | Return the output of the gpg command. |
|
inlinevirtual |
|
inlinevirtual |
LockSysadmin
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
Reimplemented in Ict.Petra.Server.App.Core.TServerManager.
|
inline |
Performs a GarbageCollection on the Server.
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
inlinevirtual |
Allows the server or admin console to run a timed job
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
Reimplemented in Ict.Petra.Server.App.Core.TServerManager.
|
inline |
Queues a ClientTask for a certain Client.
AClientID | Server-assigned ID of the Client |
ATaskGroup | Group of the Task |
ATaskCode | Code of the Task |
ATaskParameter1 | Parameter #1 for the Task (depending on the TaskGroup this can be left empty) |
ATaskParameter2 | Parameter #2 for the Task (depending on the TaskGroup this can be left empty) |
ATaskParameter3 | Parameter #3 for the Task (depending on the TaskGroup this can be left empty) |
ATaskParameter4 | Parameter #4 for the Task (depending on the TaskGroup this can be left empty) |
ATaskPriority | Priority of the Task |
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
inlinevirtual |
Marks all DataTables in the Cache to be no longer up-to-date (=out of sync with the data that was originally placed in the DataTable).
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
Reimplemented in Ict.Petra.Server.App.Core.TServerManager.
|
inlinestatic |
reset the static variables for each Web Request call.
|
inlinevirtual |
RestoreDatabaseFromYmlGZ
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
Reimplemented in Ict.Petra.Server.App.Core.TServerManager.
|
inlinevirtual |
SetPassword
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
Reimplemented in Ict.Petra.Server.App.Core.TServerManager.
|
inline |
Stops the Petra Server. A GC is invoked and waits for pending tasks before the application ends.
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
inline |
Stops the Petra Server in a more controlled way than the StopServer Method.
A ClientTask is queued for all connected Clients that asks them to save the UserDefaults, to disconnect from the Server and to close. This Method monitors the connected Clients until either all Clients have responded by disconnecting or if at least one Client didn't respond and a timeout was exceeded. If this is the case and the Argument AForceAutomaticClosing is true, a different ClientTask is queued for all Clients that are still connected that asks them to close (no saving of UserDefaults and no disconnection from the server!). This is a fallback in case (1) the client(s) crashed and can't either save the UserDefaults or can't disconnect, (2) the saving of UserDefaults or the disconnecting of Clients doesn't work for some server-side reason (e.g. broken DB connection would prevent saving of UserDefaults).
AForceAutomaticClosing | Set to true to force closing of non-responding Clients (this is set to true by the ServerAdminConsole as this process is non-interactive in this case). |
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
inlinevirtual |
Is the process job enabled?
|
inlinevirtual |
upgrade the database
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
Reimplemented in Ict.Petra.Server.App.Core.TServerManager.
|
staticprotected |
DB Reconnection attempts (-1 = no connection established yet at all; 0 = none are being made).
|
staticprotected |
Whether the Timed Processing has been set up already.
|
static |
static: only initialised once for the whole server
|
get |
Array that contains information about the Clients that are currently connected to the Petra Server.
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
get |
|
get |
Number of Clients that are currently connected to the Petra Server.
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
get |
Total number of Clients that connected to the Petra Server since the start of the Petra Server
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
get |
Server setting: Name of the Server configuration file
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
getset |
DB Reconnection attempts (-1 = no connection established yet at all; 0 = none are being made).
|
get |
Server setting: IP Port that the Server listens for .NET Remoting calls
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
get |
Result of a call to GC.GetTotalMemory
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
get |
State of the Server
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
get |
Version of the Petra Server and operating system on which the Server runs
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
get |
Whether the 'Server Timed Processing' has been set up.
|
get |
SiteKey of the OpenPetra DB that the Server is connected to.
Implements Ict.Common.Remoting.Shared.IServerAdminInterface.
|
get |
the daily start time for the timed processing