|
|
This document covers all aspects of developing project specific features for an instance of the Catalog and Archive Service (CAS).
The CAS is a policy-driven software component. This policy resides in a catalog database and is specific to the target environment and must be generated for or by the user. Presumably at some point in time in the future, this step could be performed automatically by extracting information from the
Metadata Service
and loading it directly into the CAS policy tables. Unfortunately, that time has not arrived so the policy must be generated manually. This policy must be defined using the Structured Query Language (SQL) tailored for the target database. The following database management systems are currently supported for hosting the target database:
In order to be used by the schema installation scripts this definition must be in a file located in the schema installation directory. This file must be named as follows:
<DBMS>_<identifier>_load_policy.sql
The DBMS component of the file name must be
oracle
,
sybase
or
postgres
, which indicates the database management system hosting the database where the policy will be installed. The identifier component of the file name will be the name given to the policy by the user. For example, if
test
is the identifier and
oracle
is the DBMS, then the policy file name would be
oracle_test_load_policy.sql
.
Create an empty file using your favorite editor or make a copy of the
oracle_test_load_policy.sql
file to use as a template, if your target database is an Oracle database. There are also templates available for Sybase and PostgreSQL. The policy is separated into four sets of definitions. The definition sets are
Data Element Definition
,
Task Definition
,
Rule Definition
and
Dataset Definition
. For information regarding the tables and columns referenced in this document, see the
Database Schema
section of the Catalog and Archive Management
Design Document
.
For the data element definition the user will define metadata elements that will be used to describe the products registered with the CAS. A data element definition will represent a column in the product metadata table for an associated dataset. Dataset associations are discussed in the
Dataset Definition
section. Each data element must have an entry in the
element_policy
table. The supported columns in this table are described below:
|
Column
|
Contents
|
|
element_id
|
The generated identifier for the data e
lement. The example below details how the identifier is generated and referenced.
|
|
element_name
|
The name of the data element. This value must be unique among all data elements defined in this table.
|
|
product_metadata_column
|
The name of the column for this data element in a product metadata table. May be the same as
element_name
if that value only contains characters, numbers or under scores. The bottom line is that it must be a valid column name for the target database.
|
|
dc_element
|
The
Dublin Core
element name to which this element will be mapped. For example if the value was
Title
, all incoming queries specifying the element
Title
would be mapped to the associated element. In the case where a
Profile
is to be returned from the query, the resource attribute
Title
will be populated with the associated element's value.
|
|
data_type
|
The type of data the data element will contain. The following types are supported:
-
DATETIME
- Date/time data type stored as a string in the ISO 8601 format. Example value:
2005-01-01T12:30:45.000-08:00
.
-
DOUBLE
- Floating point number data type intended for an 8 byte number.
-
INTEGER
- Integer data type intended for a 4 byte number.
-
LONG
- Long integer data type intended for an 8 byte number.
-
REAL
- Floating point number data type intended for a 4 byte number.
-
STRING
- String data type.
|
|
length
|
The amount of characters or numbers the value may contain. Valid for the
STRING
data type. Should be set to
NULL
for all other data
types. The maximum value is dependent on the target database.
|
|
description
|
The description of the data element.
|
The following is an example of SQL for Oracle representing the
Test.String
data element definition:
VARIABLE next_id NUMBER
EXEC get_next_element_id (:next_id);
INSERT INTO element_policy
(element_id, element_name, product_metadata_column,
dc_element, data_type, length,
description) VALUES
(:next_id, 'Test.String', 'Test_String',
NULL, 'STRING' 30,
'Test element for a string value.');
COMMIT;
For the task definition the user will define tasks to be executed once a product has been registered with the CAS. For information on task development see the
Task/Rule Development
section of this document. Each task must have an entry in the
task_policy
table. The columns in this table are described below:
|
Column
|
Contents
|
|
task_id
|
The generated identifier for the task. The example below details how the identifier is generated and referenced.
|
|
task_name
|
The class specification for the task. This value must be unique among all tasks defined in this table. The class specified or the JAR file containing the class must be referenced in the CAS environment's class path.
|
|
description
|
The description of the task.
|
The following is an example of SQL for Oracle representing the
NoOpTask
task definition:
VARIABLE next_id NUMBER
EXEC get_next_task_id (:next_id);
INSERT INTO task_policy
(task_id, task_name,
description) VALUES
(:next_id, 'jpl.eda.archive.server.NoOpTask',
'This task does absolutely nothing.');
COMMIT;
For the rule definition the user will define rules to be executed prior to the execution of a task. For information on rule development see the
Task/Rule Development
section of this document. Each rule must have an entry in the
rule_policy
table. The columns in this table are described below:
|
Column
|
Contents
|
|
rule_id
|
The generated identifier for the rule. The example below details how the identifier is generated and referenced.
|
|
rule_name
|
The class specification for the rule. This value must be unique among all rules defined in this table. The class specified or the JAR file containing the class must be referenced in the CAS environment's class path.
|
|
description
|
The description of the rule.
|
The following is an example of SQL for Oracle representing the
NoOpRule
rule definition:
VARIABLE next_id NUMBER
EXEC get_next_rule_id (:next_id);
INSERT INTO rule_policy
(rule_id, rule_name,
description) VALUES
(:next_id, 'jpl.eda.archive.server.NoOpRule',
'This rule does absolutely nothing.');
COMMIT;
For the dataset definition the user will define the product to be registered with the
CAS. Each dataset must have an entry in the
dataset_policy
table and may have entries in the
dataset_element_relation
,
dataset_task_relation
and
dataset_task_rule_relation
tables. The policy for the dataset defines how the CAS will handle products registered with this dataset. The columns in the
dataset_policy
table are described below:
|
Column
|
Contents
|
|
dataset_id
|
The generated identifier for the dataset. The example below details how the identifier is generated and referenced.
|
|
dataset_name
|
The name of the dataset. This value must be unique among all datasets defined in this table.
|
|
product_metadata_table
|
The name of the product table where metadata is stored for products registered with this dataset. The example below details the generation of a unique name based on the dataset identifier. If developer defined, it must be a valid table name for the target database.
|
|
product_reference_table
|
The name of the product table where references to product items are stored for products registered with this dataset. The example below details the generation of a unique name based on the dataset identifier. If developer defined, it must be a valid table name for the target database.
|
|
repository
|
The path of the repository for files registered with this dataset. The path must represent a directory on a mounted drive to the machine hosting the CAS with appropriate privileges to the user account that launched the CAS process.
|
|
description
|
The description of the dataset.
|
The following is an example of SQL for Oracle representing the
Test.Metadata.Tasks
dataset definition for the
dataset_policy
table:
VARIABLE next_id NUMBER
EXEC get_next_dataset_id (:next_id);
INSERT INTO dataset_policy
(dataset_id, dataset_name,
product_metadata_table, product_reference_table, repository,
description) VALUES
(:next_id, 'Test.Metadata.Tasks',
NULL, NULL, NULL,
'Test dataset with associated metadata and tasks.');
UPDATE dataset_policy SET
product_metadata_table =
'product_metadata_' || to_char(dataset_id),
product_reference_table =
'product_reference_' || to_char(dataset_id),
repository =
'/home/user/repository/product_' || to_char(dataset_id)
WHERE dataset_name = 'Test.Metadata.Tasks';
COMMIT;
The data element relationship policy for the dataset defines which data elements the CAS will accept as metadata for a product registered with this dataset. The supported columns in the
dataset_element_relation
table are described below:
|
Column
|
Contents
|
|
dataset_id
|
The identifier for the dataset. The example below details the retrieval of the identifier from the
dataset_policy
table based on the dataset name.
|
|
element_id
|
The identifier for the data element. The example below details the retrieval of the identifier from the
element_policy
table based on the element name
|
|
index_flag
|
A flag indicating whether an index will be created for the column associated with this element in the product metadata table. Be sure you know what you are doing before setting this value to
Y
. Valid values:
Y
or
N
.
|
The following is an example of SQL for Oracle representing the
Test.Metadata.Tasks
dataset/data element relationship definition for the
dataset_element_relation
table:
INSERT INTO dataset_element_relation
(dataset_id, element_id, index_flag)
(SELECT dataset_id, element_id, , 'N'
FROM dataset_policy, element_policy
WHERE dataset_name = 'Test.Metadata.Tasks'
AND element_name = 'Test.String');
COMMIT;
The task relationship policy for the dataset defines which tasks to execute for a product registered with this dataset. The columns in the
dataset_task_relation
table are described below:
|
Column
|
Contents
|
|
dataset_id
|
The identifier for the dataset. The example below details the retrieval of the identifier from the
dataset_policy
table based on the dataset name.
|
|
task_id
|
The identifier for the task. The example below details the retrieval of the identifier from the
task_policy
table based on the task name
|
|
event_exec_flag
|
A flag indicating whether this task will be executed, not executed, ignored or queued as the result of a product registration event. The following values are supported:
-
Y
- The task will be executed during the product registration transaction assuming the associated rules are satisfied.
-
N
- The task will
not
be executed. This option essentially drops the task on the floor.
-
I
- The task will
not
be executed, but its information will be inserted in the
task_ignore
table. From this table the task can be moved to the
task_queue
table where it can be exec
uted.
-
Q
- The task will
not
be executed, but its information will be inserted in the
task_queue
table. From this table the task will be executed as the result of a queue event.
|
|
event_priority
|
The priority for task execution if executed as the result of a product registration event. If more than one task has been defined for a dataset, this value will determine the order of execution.
|
|
event_fail_flag
|
A flag indicating whether failure of this task will cause the associated product registration event to fail. This is only valid when the task is executed during the product registration transaction. Valid values:
Y
or
N
.
|
|
queue_exec_flag
|
A flag indicating whether this task will be executed or remain in the queue as the result of a queue event. This flag can be used to hold tasks in the queue indefinitely. Valid values:
Y
or
N
.
|
|
queue_priority
|
The priority for task execution if executed as the result of a queue event. If more than one task is retrieved from the queue, this value will determine the order of execution.
|
|
wait_length
|
The maximum amount of time in minutes that a task will wait in the queue for
MANDATORY
and
OPTIONAL
rules that are not satisfied. This value should be set to the longest wait length among the associated rules for this task and dataset.
|
The following is an example of SQL for Oracle representing the
Test.Metadata.Tasks
dataset/task relationship definition for the
dataset_task_relation
table:
INSERT INTO dataset_task_relation
(dataset_id, task_id,
event_exec_flag, event_priority, event_fail_flag,
queue_exec_flag, queue_priority, wait_length)
(SELECT dataset_id, task_id, 'Y', 1, 'N', 'Y', 1, 0
FROM dataset_policy, task_policy
WHERE dataset_name = 'Test.Metadata.Tasks'
AND task_name = 'jpl.eda.archive.server.NoOpTask');
COMMIT;
The rule relationship policy for the task and dataset defines which rules to execute prior to a task being executed as the result of a product registered with this dataset. The columns in the
dataset_task_relation
table are described below:
|
Column
|
Contents
|
|
dataset_id
|
The identifier for the dataset. The example below details the retrieval of the identifier from the
dataset_policy
table based on the dataset name.
|
|
task_id
|
The identifier for the task. The example below details the retrieval of the identifier from the
task_policy
table based on the task name
|
|
rule_id
|
The identifier for the rule. The example below details the retrieval of the identifier from the
rule_policy
table based on the rule name
|
|
rule_exec_flag
|
A flag indicating whether this rule will be executed. This flag is very useful in a test environment to turn off certain rules in order to test a following rule or the task for error conditions. It could also be useful in operations when an
OPTIONAL
or
RETRY
rule will certainly fail because of current conditions but the user wants the task to execute anyway. Valid values:
Y
or
N
.
|
|
rule_priority
|
The priority for rule execution. If more than one rule has been defined for a task associated with a dataset, this value will determine the order of execution.
|
|
rule_type
|
The type of rule which indicates how the rule is handled when
the rule is not satisfied. The following values are supported:
-
MANDATORY
- This type indicates that the associated task will be removed from the queue in the case where the rule is not satisfied and the wait time has expired. An example of this type would be a rule that checked for an input file to the task. If the input file was not available, the task would remain in the queue until the wait time for the rule expired. Upon expiration, the task would be moved to the
task_ignore
table.
-
OPTIONAL
- This type indicates that the associated task will be executed in the case where the rule is not satisfied and the wait time has expired. An example of this type would be a rule that checked for a range of available data. If all of the data was not available, the task would remain in the queue until the wait time for the rule expired. Upon expiration, the task would be executed with the partial range of available data.
-
RETRY
- This type indicates that the associated task will remain in the queue and the wait time extended in the case where the rule is not satisfied. An example of this type would be a rule that checked the current load of the machine against a defined policy. If the machine was too busy, the task would remain in the queue and would be continually retried until the machine load was satisfactory.
|
|
wait_length
|
The amount of time in minutes that an associated task will wait in the queue if this rule is not satisfied.
|
The following is an example of SQL for Oracle representing the
Test.Metadata.Tasks
dataset/task/rule relationship definition for the
dataset_task_rule_relation
table:
INSERT INTO dataset_task_rule_relation
(dataset_id, task_id, rule_id, rule_exec_flag, rule_priority,
rule_type, wait_length)
(SELECT dataset_id, task_id, rule_id, 'Y', 1, 'MANDATORY', 0
FROM dataset_policy, task_policy, rule_policy
WHERE dataset_name = 'Test.Metadata.Tasks'
AND task_name = 'jpl.eda.archive.server.NoOpTask'
AND rule_name = 'jpl.eda.archive.server.NoOpRule');
COMMIT;
Once the policy has been generated, it will be ready for policy installation as described in the
Install Policy
section of the
Install Guide
document.
The CAS provides for instance specific processing triggered by a successful product registration. The processing comes in the form of a combination of rules and tasks implemented as Java classes. The relationships between rules, tasks and datasets are defined in the CAS policy as described in the
Policy Definition
section of this document. This section does assume that the reader has some familiarity with Java and provides several references to the Java Documentation (javadocs) pages for the CAS classes where more detailed information can be found.
A Java class representing a task or rule to be executed by the CAS, must conform to the
Task
or
Rule
interface, respectively. The two interfaces are very similar in that they consist of a single
run()
method with the only differences being that the Task interface passes an additional
execId
parameter and the Rule interface returns a boolean value (true or false) indicating whether the rule was satisfied or not. The common parameters are as follows:
|
Parameter
|
Description
|
|
props
|
An instance of the
Proper
ties
class containing any properties defined for the CAS instance.
|
|
db
|
An instance of the
JDBC_DB
class which provides an interface for accessing the CAS database. If the user is so inclined to query the database tables directly, they should consult the
Database Schema
section of the
Design
document.
|
|
dataset
|
An instance of the
Dataset
class containing policy information regarding the dataset of the registered product.
|
|
product
|
An instance of the
Product
class containing information regarding the registered product.
|
|
taskId
|
An integer representing the identifier for the task as defined in the policy.
|
|
execId
|
An integer representing the identifier for the instance of the task executed for the registered product. This parameter is only utilized in the Task interface.
|
The source distribution for the CAS includes two template classes,
NoOpTask
and
NoOpRule
, which provide a blank slate for developing tasks and rules, respectively. Each of these classes includes an empty
run()
method as well as a
main()
method for executing the class from the command-line. Although the two interfaces are very similar, tasks and rules differ in the manner and situation that they are executed by the CAS which is dictated by the policy. The conceptual difference between the two is that a rule should not modify data in any way, whereas a task is intended to
do just that. The subsequent sections provide Java code examples for common functions which can be performed in either tasks or rules.
The CAS has a built in logging mechanism which allows tasks and rules to generate messages for inclusion in the log. See the
Catalog and Archive Service
section of the
Operation Guide
for more information regarding the logging properties. The logging mechanism supports five categories of messages:
Trace
,
Debug
,
Info
,
Warn
and
Error
. The
Log
class from the
edm-commons
component is utilized for generating messages.
Log.get("Error").println(
"MyTask.run(): An exception occurred doing something.");
The above code will result in the following message being posted to the log, which includes a date/time stamp, the CAS URN and the specified category:
2005-04-01T12:30:45.000-08:00 urn:eda:rmi:JPL.Test.Archive Error: \
MyTask.run(): An exception occurred doing something.
Each registered product may have associated metadata elements as defined in the CAS policy. A map of the element/value pairs or a list of the elements and their policy can be retrieved from the
Product
class. If the task or rule is executed during the product registration transaction, the element values will only be available if the metadata was passed in via the metadata buffer and not available if passed in via a metadata file. All metadata information is available if the task or rule
is executed from the queue. In the following example, the value associated with the task specific element
Project.Name
, is extracted from the map:
HashMap map = product.getProductMetadata();
String projectName = (String) map.get("Project.Name");
The example above returns the value as a string even if the element has a data type of integer or some other type. The example below utilizes the
ElementList
and
ElementAttrInfo
classes to provide a means for returning the appropriately typed value based on the CAS policy.
ElementList elementList = product.getElementList();
ElementAttrInfo elementAttrInfo =
elementList.getElementAttrInfo("Project.Name");
String projectName = elementAttrInfo.getStringValue();
Several scenarios for task development involve determining additional metadata for a product and updating that metadata in the database. This can be accomplished utilizing the
MetadataElementList
class. In the following example, two metadata elements are added to the list with their associated values and then the database is updated for the specified product:
try {
MetadataElementList metadataList =
new MetadataElementList(db, dataset, product.getProductId());
metadataList.addElement("Project.Name", "MyProject");
metadataList.addElement("Project.Id", "1000");
metadataList.addToDatabase();
}
catch (MetadataElementListException e) {}
In the example above, notice that the
Project.Id
element value is passed in as a string when the poli
cy dictates a data type of integer. The
MetadataElementList
class determines the data type of the element based on the CAS policy and inserts it into the database appropriately.
The alternative is to update the metadata element values directly in the product metadata table using SQL. Although the previous example is preferred, this example demonstrates the flexibility available to the developer. In the following example, SQL is utilized to update the product metadata table where the table name is extracted from the dataset policy and the column names are extracted from the element policy (SQL reserved words in the SQL command are capitalized for clarity):
try {
ElementList elementList = dataset.getElementList();
ElementAttrInfo elemName =
elementList.getElementAttrInfo("Project.Name");
ElementAttrInfo elemId =
elementList.getElementAttrInfo("Project.Id");
String projectName = "MyProject";
int projectId = 1000;
String sqlCmd =
"UPDATE " + dataset.getMetadataTable() + " SET " +
elemName.getColumn() + " = '" + projectName + "', " +
elemId.getColumn() + " = " + projectId +
" WHERE product_id = " + product.getProductId();
Log.get("Debug").println("MyTask.run(): SQL: " + sqlCmd);
db.executeSQLCommand(sqlCmd);
}
catch (SQLException e) {}
Each registered product may have a list of product items or files associated with the product. This list is represented in the
ProductList
class which can be retrieved from the
Product
class. In the following example, the file name is extracted from the product reference for each remote file registered with the product:
try {
ProductList productList = product.getProductList();
for (int i = 0; i < productList.getCount(); i++) {
String productRefType = productList.getProductRefType(i);
if (productRefType.equals("FILE_DATA_REMOTE")) {
String fileSpec =
new URL(productList.getProductRef(i)).getPath();
String fileName =
fileSpec.substring(fileSpec.lastIndexOf('/') + 1);
}
}
}
catch (MalformedURLException e) {}
If the product item was transferred to the CAS, (reference types
FILE_DATA_LOCAL
and
FILE_METADATA
), then the archive reference can be obtained from the
ProductList
class with the
getArchiveRef()
method. This reference specifies the location of the file in the CAS repository.
Several scenarios for task and rule development involve determining whether another product is currently registered with the CAS. This other product could be registered with the current product's dataset or with another dataset. In the following example, information about another dataset is determined and the other product is queried for from that dataset's product metadata table:
try {
Dataset otherDataset = new Dataset(db, "Dataset.Name");
ElementList elementList = otherDataset.getElementList();
ElementAttrInfo elemName =
elementList.getElementAttrInfo("Project.Name");
String projectName = "MyProject";
String sqlCmd =
"SELECT product_id FROM " + otherDataset.getMetadataTable() +
" WHERE " + elemName.getColumn() + " = '" + projectName + "'";
ResultSet rs = db.executeQuery(sqlCmd);
int otherProductId;
int count = 0;
while (rs.next()) {
productId = rs.getInt(1);
count++;
}
if (count < 1) {
// Problem: no product found
}
else if (count > 1) {
// Problem: too many products found
}
Product otherProduct = new Product(db, otherDataset);
otherProduct.load(otherProductId);
}
catch (DatasetException e) {}
catch (SQLException e) {}
catch (ProductException e) {}
If this were a rule, the product was found or not and the rule was satisfied or not. If this were a task, the developer may want to do something with the discovered product or investigate that product's metadata further.
A very common scenario involves executing an external command, whether it be a Perl script or an application of some sort, from a task. In the following example, the command is constructed using a metadata element value as an argument and the command is executed:
try {
HashMap map = product.getProductMetadata();
String projectName = (String) map.get("Project.Name");
String execCmd = "/usr/local/bin/task_command " + projectName;
Log.get("Debug").println(
"MyTask.run(): Execution Command: " + execCmd);
Process process = Runtime.getRuntime().exec(execCmd);
}
catch (Exception e) {}
In each of the examples above, an attempt has been made to detail the appropriate exception to be caught for the snippet of code provided. This section details a suggested method for handling most exceptions. There are three typical steps to perform:
-
Generate and log a message for the caught exception.
-
Generate and log a message describing what was occurring when the exception was thrown.
-
Throw a
TaskException
or
RuleException
with the message and exception object as parameters.
catch (Exception e) {
Log.get("Error").println(
"MyTask.run(): Exception '" + e.getClass().getName() +
"' occurred with message '" + e.getMessage() + "'");
String message =
"MyTask.run(): An exception occurred doing something.";
Log.get("Error").println(message);
throw new TaskException(message, e);
}
The CAS has an Activity Tracking mechanism built into it based on an OODT capability provided in the
edm-commons
component. Each activity may contain any number of incidents and corresponds well with a CAS event. The CAS utilizes the
DatagramLogger
application for tracking activities. For information regarding the configuration and launch of this application, see the
Operation Guide
.
Maybe this section will find its way to the
Common Components
documentation. Until then, it will reside here. When utilzing the
DatagramLogger
application for storing activities, there are a number of storage mechanisms available. This section will focus on two of them.
XMLStandardOutputStorage
The
XMLStandardOutputStorage
class captures the activity from the
DatagramLogger
application and sends an XML formatted representation to the terminal's standard output stream. The following example represents an activity with a single
ActivityStopped
incident.
<?xml version="1.0" encoding="UTF-8"?>
<activity id="d2da241b7831ddd14e3549b52808f6e">
<jpl.eda.activity.ActivityStopped time="1104772913440">
jpl.eda.activity.ActivityStopped
</jpl.eda.activity.ActivityStopped>
</activity>
SQLDatabaseStorage
The
SQLDatabaseStorage
storage class captures the activity from the
DatagramLogger
application and sends it to the specified database. This class expects the following table to exist in the specified database:
The
incidents
table stores activity incidents. Data types used in the column descriptions below are specific to the Oracle Database Management System (DBMS). This table consists of the following columns:
-
activityID
The generated identifier for the activity. This column is part of the primary key for the table. Data type: VARCHAR2(32).
-
className
The name of the incident class. This column is part of the primary key for the table. Data type: VARCHAR2(255).
-
occurTime
The time the incident occurred, represented as the number of milliseconds since January 1, 1970, 00:00:00
GMT. Data type: LONG.
-
detail
The details associated with the incident. The CAS specific incident classes represent the incident details in an XML structure. Data type: CLOB.
In order to create the
incidents
table in an Oracle Database, perform the following SQL commands using
sqlplus
or another appropriate tool:
CREATE TABLE incidents (
activityID VARCHAR2(32) NOT NULL,
className VARCHAR2(255) NOT NULL,
occurTime LONG DEFAULT 0 NOT NULL,
detail CLOB NULL
);
ALTER TABLE incidents
ADD CONSTRAINT incidents_pk
PRIMARY KEY (activityID, className, occurTime);
The above syntax should be suppported by any of the database vendors supported by this class. In most cases the data types will need to be modified. For example, the data types for each of the columns in a PostgreSQL database would be
VARCHAR(32)
,
VARCHAR(255)
,
BIGINT
and
TEXT
respectively.
Maybe this section will also find its way to the
Common Components
documentation. Until then, it will reside here. There is currently only one retrieval mechanism available. The
SQLDatabaseRetrieval
class retrieves the activities from the specified database. This class accesses the same table that is described in the
Activity Storage
section above. The activities are returned as a list of
StoredActivity
classes. This class in turn provides access to the activit
y identifier and the list of associated incidents.
Although the Activity Tracking capability is generic, the classes representing the incidents that occur within the CAS for each activity, are specific to the CAS.
ClientInfo
The
ClientInfo
incident class captures information about the client gathered by the
ArchiveClient
class and sent to the CAS server at the start of each event. The detailed pieces of information captured by this incident are identified by element names which are defined in the following table:
|
Element
|
Description
|
|
userName
|
The user name associated with the account on the machine where the request originated.
|
|
hostName
|
The domain name of the machine where the request originated.
|
|
hostAddress
|
The IP address of the machine where the request originated.
|
|
osName
|
The identifier for the operating system on the machine where the request originated.
|
The details are stored in an XML structure. The following is an example of this structure:
<detail>
<userName>shardman</userName>
<hostName>avatar.jpl.nasa.gov</hostName>
<hostAddress>137.79.16.217</hostAddress>
<osName>Mac OS X</osName>
</detail>
EventBegin
The
EventBegin
inc
ident class captures information about the reqeusted event. The detailed pieces of information captured by this incident are identified by element names which are defined in the following table:
|
Element
|
Description
|
|
object
|
The URN of the CAS server where the event was requested.
|
|
event
|
The event requested of the CAS. Valid values:
ADD
,
GETID
,
GET
,
GETMETADATA
,
GETPROFILES
,
UPDATE
,
DELETE
,
QUEUE
or
PING
.
|
The details are stored in an XML structure. The following is an example of this structure:
<detail>
<object>urn:eda:rmi:JPL.Test.Archive</object>
<event>ADD</event>
</detail>
EventRequest
The
EventRequest
incident class captures identifying information for the requested event. This incident is not captured for the
QUEUE
and
PING
events. The detailed pieces of information captured by this incident are identified by element names which are defined in the following table:
|
Element
|
Description
|
|
query
|
The query, represented in
DIS-Style
format, which contains identifying information for the event. This information identifies a product or products affected by the event.
|
The details are stored in an XML structure. The following is an example of this structure:
<detail>
<query>
CAS.ProductType = Test.Metadata.NoTasks AND
CAS.ProductName = Test
</query>
</detail>
EventResult
The
EventResult
incident class captures result information for the event. This incident is only captured for the
ADD
,
GET
and
GETPROFILES
events. The detailed pieces of information captured by this incident are identified by element names which are defined in the following table:
|
Element
|
Description
|
|
count
|
The number of files transferred by the event. For the
GETPROFILES
event, this is the number of profiles returned.
|
|
length
|
The total length of the files transferred by the event. For the
GETPROFILES
event, this value is set to zero.
|
The details are stored in an XML structure. The following is an example of this structure:
<detail>
<count>3</count>
<length>3575</length>
</detail>
EventException
The
EventException
incident class captures exception information for the event. Existence of this incident may preclude the existence of other expected incidents for a given activity. The detailed pieces of information captured by this incident are identified by element names which are defined in the following table:
|
Element
|
Description
|
|
exception
|
The class specification for the thrown exception.
|
|
message
|
The message associated with the thrown exception.
|
The details are stored in an XML structure. The following is an example of this structure:
<detail>
<exception>jpl.eda.archive.server.ProductException</exception>
<message>
Product.add(): The product name ':Test' is not a valid name.
</message>
</detail>
|