Client Functions
The Profile Class is a base object required for all Servlets (and
eventually Applets) and should be instantiated as one of the very first things
the application performs. It contains basic instance information that the
application itself may not require but is needed for the Common Logging
Facility. The Profile object contains a higher level interface that the
application calls to send messages to any of the CLF services - such as "logMGSMessage".
These stub methods are responsible for ensuring the completeness and accuracy
of the message sent to the service, calling the remote service, and finally
handling any return messages or errors.
- The Profile constructor requires two parameters
- Sys_Name identifies the System name.
- App_Name the application's name.
- When the constructor is called the profile object will, if needed, locate
all remote services and populate the following attributes:
| Profile Attributes |
|
| Session ID |
Identifies this user's session, may be generated by the constructor or set
separately |
| Transaction ID |
Identifies this transaction uniquely |
| System Name |
Identifies the System to which this application belongs - Sys_Name |
| Application Name |
This application's name - App_Name |
| Date/Time Stamp |
Date/Time this Profile object is created |
| CLF Server Name |
Used to locate and send RMI messages to the CLF service | The
application typically doesn't need to know or care about this kind of
information, but this information is needed to enable the CLF services outlined
below.
logMGSMessage Method
The primary client method is "logMGSMessage()" and takes 2-5
parameters as follows:
| id |
required - a label for the message. Can be used to help associate messages
or identify the routine within the application that logged the message. |
| desc |
required - the actual MGS message to be logged. |
| desc2 |
optional - additional MGS message information |
| desc3 |
optional - additional MGS message information |
| desc4 |
optional - additional MGS message information |
The "logMGSMessage" method is contained in the Profile object
mainly to encourage use of the Profile object. Since most of the parameters are
contained in the Profile object, they can be accessed directly without the
caller needing to pass a Profile object.
The logMGSMessage has the following basic responsibilities:
- Locate the remote service, if not already known
- Load the MGS stub code needed to call the MGS server.
- Build a common header to uniquely identify this message using information
from the Profile object.
- Date/Time stamp the message.
|