com.ibm.wbi
Interface SystemContext


public interface SystemContext

A SystemContext encapsulates "static" information applicable to the system (or engine) that the Megs run under. A system context should not change while running under the same process.


Method Summary
 Section getConfigSection()
          Get the config section.
 com.ibm.wbi.DatabaseWatcher getDatabaseWatcher()
          Obtain a reference to the database watcher
 java.lang.String getInstallPath()
          Get the system install path.
 Section getRootSection()
          Get the root section acts as the central repository for configuration data for the system context we are running under.
 com.ibm.wbi.Service getService(java.lang.Integer identity)
          Obtain a Service to service, or spawn, a new request internal to the Proxy from the specified Sublayer identity.
 java.lang.Object getSystemResource(java.lang.String key)
          Obtain a System resource by a System resource identification key.
 java.lang.Object getUserData(java.lang.Object key)
          Get an arbitrary user value
 void reload()
          Reloads the system context.
 void removeUserData(java.lang.Object key)
          Remove an arbitrary user value
 void setUserData(java.lang.Object key, java.lang.Object value)
          Set an arbitrary user value
 java.util.Enumeration systemResourceKeys()
          Obtain a list of available System resource identification keys.
 

Method Detail

getSystemResource

public java.lang.Object getSystemResource(java.lang.String key)
Obtain a System resource by a System resource identification key.
Parameters:
key - The System resource key.
Returns:
The System resource.

systemResourceKeys

public java.util.Enumeration systemResourceKeys()
Obtain a list of available System resource identification keys.
Returns:
An enumeration of keys.

getInstallPath

public java.lang.String getInstallPath()
Get the system install path.
Returns:
The system install path.

getRootSection

public Section getRootSection()
Get the root section acts as the central repository for configuration data for the system context we are running under.
Returns:
The root section

reload

public void reload()
Reloads the system context.

getConfigSection

public Section getConfigSection()
Get the config section. The answer to this method varies depending on the value of configurationType. This method exists so that the value of configurationType can be hidden, otherwise a well known name like "/config" would be preferred.
Returns:
The config section

getUserData

public java.lang.Object getUserData(java.lang.Object key)
Get an arbitrary user value
Returns:
The value associated with the key

setUserData

public void setUserData(java.lang.Object key,
                        java.lang.Object value)
Set an arbitrary user value

removeUserData

public void removeUserData(java.lang.Object key)
Remove an arbitrary user value

getService

public com.ibm.wbi.Service getService(java.lang.Integer identity)
                               throws RequestRejectedException
Obtain a Service to service, or spawn, a new request internal to the Proxy from the specified Sublayer identity.
Parameters:
identity - The Sublayer identity.
Returns:
The Service api for servicing requests.
Throws:
RequestRejectedException - If unable to service this type of request.

getDatabaseWatcher

public com.ibm.wbi.DatabaseWatcher getDatabaseWatcher()
Obtain a reference to the database watcher
Returns:
The DatabaseWatcher reference