RealServer maintains a Property Registry that contains a variety of information about the server's configuration and current load, connected clients, and each client's sessions. The RealServer Property Registry can also be used to store new, user-defined properties, which can be changed or deleted by the process that created them. All these properties, whether predefined or user-defined, can be retrieved by server plug-ins through the use of interfaces designed for this purpose. Server plug-ins can also arrange to be notified when specific properties change.
![]() |
Additional Information |
---|
See "Chapter 9: Monitor Plug-in" to learn how to create a plug-in that monitors properties in the RealServer Property Registry. |
The RealServer Property Registry is a hierarchical structure of Name/Value pairs (properties) which is capable of storing many different types of data including strings, buffers, and integers. The registry provides various types of information including server and client statistics, configuration information, and system status. Each Registry Property has a name, ID, datatype, and value. The registry interfaces provided by RealServer include methods for the setting and retrieval of properties by name or by ID.
The following table lists the registry datatypes currently available for use. The Methods
column lists the methods supported for each datatype..
Datatype | Methods | Method Description |
---|---|---|
Integer Signed 32-bit |
IRMAPNRegistry::AddInt |
Adds a new property. |
IRMAPNRegistry::GetIntByName |
Retrieves a value using the property name. | |
IRMAPNRegistry::GetIntById |
Retrieves a value using the property ID. | |
IRMAPNRegistry::SetIntByName |
Sets a value using the property name. | |
IRMAPNRegistry::SetIntById |
Sets a value using the property ID. | |
String NULL terminated unsigned char* within an IRMABuffer |
IRMAPNRegistry::AddStr |
Adds a new property. |
IRMAPNRegistry::GetStrByName* |
Retrieves a value using the property name. | |
IRMAPNRegistry::GetStrById* |
Retrieves a value using the property ID. | |
IRMAPNRegistry::SetStrByName |
Sets a value using the property name. | |
IRMAPNRegistry::SetStrById |
Sets a value using the property ID. | |
Buffer class, unsigned char* value |
IRMAPNRegistry::AddBuf |
Adds a new property. |
IRMAPNRegistry::GetBufByName |
Retrieves a value using the property name. | |
IRMAPNRegistry::GetBufById |
Retrieves a value using the property ID. | |
IRMAPNRegistry::SetBufByName |
Sets a value using the property name. | |
IRMAPNRegistry::SetBufById |
Sets a value using the property ID. | |
Integer Reference Signed integer*, 32-bit value |
IRMAPNRegistry::AddIntRef |
Adds a new property. |
Composite Combination of other properties |
IRMAPNRegistry::AddComp |
Adds a new property. |
* Takes as a parameter an IRMABuffer interface in which it passes back the retrieved string. |
As you build your monitor plug-in, keep in mind the following about registry datatypes:
IRMAPNRegistry::GetIntByName
or IRMAPNRegistry::GetIntById
.
The following table lists the server properties predefined in the RealServer registry.
The following table lists the predefined registry properties for each connected client. The n
in the property name is a placeholder for the client's ID. Note that only the client
property is present at all times. The client.
n
.*
properties are present only as long as client.
n
is connected. RealServer deletes these properties from the registry as clients disconnect. Also note that the Session
attributes are not available when the client connects, but become available as the client/server control negotiation progresses.
The following table lists the license properties predefined in the RealServer registry.
The following table lists the monitor properties predefined in the RealServer registry.
In addition to the predefined and user-defined properties described so far, the RealServer Property Registry contains a number of server configuration parameters, which are loaded from a configuration file on server start-up. A plug-in can use the methods listed above to retrieve these customized or predefined RealServer configuration parameters from the registry. (See "Appendix E: RealServer Configuration".) Because the parameters entered in the configuration file do not specify the registry datatypes, RealServer sets the datatypes appropriately as integers or strings when it reads the file. Parameters that have true
or false
values (case does not matter) are added as integer values with true
equal to 1
and false
equal to 0
. The monitor plug-in then accesses the properties by name according to conventions such as these:
config.Variable_Name
config.List_Name.Variable_Name
config.List_Name.List_Name.Variable_Name
![]() |
Note |
---|
RealServer supports arbitrarily complex nested lists for configuration parameters. The registry property naming conventions may therefore be more complex than the examples above. |
Variables within lists and lists within lists can also be accessed by their order within the list one level above them. (They must be accessed this way if they are not named.) Instead of using the variable or list name, the plug-in uses elem
x
, where x
is the list entry number, starting with zero. For example, suppose that the configuration file specifies the following parameter:
<List Name="FSMount">
<List Name="pn-live3">
<Var MountPoint="/live/"/>
<Var Port="7090"/>
</List>
<List Name="pn-local">
<Var MountPoint="/"/>
<Var BasePath="/home/realsystem/rafiles"/>
<Var Authentication="True"/>
</List>
</List>
The plug-in can access the /live/
value for the first MountPoint
variable with any of the following:
config.FSMount.pn-live3.MountPoint
config.FSMount.pn-live3.elem0
config.FSMount.elem0.MountPoint
config.FSMount.elem0.elem0