<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright © 2005 Covad, Mahindra – British Telecom Limited, 
MetaSolv Software Inc., Motorola, Inc., NEC Corporation, 
Nokia Networks Oy, Nortel Networks Limited, Sun Microsystems Inc..  
All rights reserved. Use is subject to license terms. 
-->
<!--
 
DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR
NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH
DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:co="http://java.sun.com/products/oss/xml/Common" xmlns:cbemeasurement="http://java.sun.com/products/oss/xml/CBE/Measurement" xmlns:cbeschedule="http://java.sun.com/products/oss/xml/CBE/Schedule" xmlns:cbecore="http://java.sun.com/products/oss/xml/CBE/Core" xmlns:cbereport="http://java.sun.com/products/oss/xml/CBE/Report" elementFormDefault="qualified" targetNamespace="http://java.sun.com/products/oss/xml/CBE/Measurement">
   <annotation>
      <documentation>This Schema was generated by the OSS through Java XML Toolkit Doclet 3-30-2005 15:27</documentation>
   </annotation>
   <import namespace="http://java.sun.com/products/oss/xml/CBE/Schedule" schemaLocation="http://java.sun.com/products/oss/xml/CBE/Schedule/XmlCBEScheduleSchema.xsd" />
   <import namespace="http://java.sun.com/products/oss/xml/CBE/Report" schemaLocation="http://java.sun.com/products/oss/xml/CBE/Report/XmlCBEReportSchema.xsd" />
   <import namespace="http://java.sun.com/products/oss/xml/Common" schemaLocation="http://java.sun.com/products/oss/xml/Common/XmlCommonSchema.xsd" />
   <import namespace="http://java.sun.com/products/oss/xml/CBE/Core" schemaLocation="http://java.sun.com/products/oss/xml/CBE/Core/XmlCBECoreSchema.xsd" />
   <complexType name="ThresholdDefinition">
      <annotation>
         <documentation>The Threshold Definition interface provides a mechanism for the configuration
 of the parameters that specify the criteria that determines the setting and
 the clearing of threshold crossing states (threshold crossed and threshold
 cleared). A threshold enters a threshold crossed state when it reaches the
 threshold value specified by the setValue operation. It will remain in this
 state until it enters a threshold cleared state. A threshold cleared state is
 achieved when a threshold reaches a value that is calculated using the
 offset and the threshold value. If the direction of the threshold is
 rising, the value is computed by subtracting the offset from the
 threshold value. Once the threshold reaches this value, it will remain in a
 threshold cleared state until it rises to the threshold value again. If the
 direction is falling, the offset is added to the threshold value and it
 will remain in the threshold cleared state until it descends to the threshold
 value again.

 &lt;p&gt;
 The valid attribute types are defined in
 &lt;code&gt;javax.oss.cbe.measurement.PerformanceAttributeDescriptor&lt;/code&gt;. However the
 &lt;code&gt;STRING&lt;/code&gt; type is not allowed for a threshold attribute.</documentation>
      </annotation>
      <sequence>
         <element name="attributeDescriptor" minOccurs="0" nillable="true" type="cbemeasurement:PerformanceAttributeDescriptor" />
         <element name="value" minOccurs="0" nillable="true" type="anyType" />
         <element name="offset" minOccurs="0" nillable="true" type="anyType" />
         <element name="direction" minOccurs="0" nillable="true" type="int" />
         <element name="perceivedSeverity" minOccurs="0" nillable="true" type="short" />
      </sequence>
   </complexType>
   <complexType name="QueryPerformanceMonitorValue">
      <annotation>
         <documentation>This interface represents the attributes of a measurement job that can be used to make queries for
 measurement jobs.

 &lt;p&gt;
 The attributes will be used to filter out the measurement jobs that match the values of the attributes.
 The attributes are concatenated using logical AND-operation.</documentation>
      </annotation>
      <complexContent>
         <extension base="co:QueryValue">
            <sequence>
               <element name="name" minOccurs="0" nillable="true" type="string" />
               <element name="granularityPeriod" minOccurs="0" nillable="true" type="int" />
               <element name="state" minOccurs="0" nillable="true" type="int" />
               <element name="valueType" minOccurs="0" nillable="true" type="string" />
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <complexType name="PerformanceMonitorValue">
      <annotation>
         <documentation>This interface is the base value representation of a measurement job.

 &lt;p&gt;
 The &lt;CODE&gt;JVTPerformanceMonitorSession&lt;/CODE&gt; manages measurement jobs. A client can create and retrieve
 measurement jobs indirectly by using the methods of an &lt;CODE&gt;JVTPerformanceMonitorSession&lt;/CODE&gt;.

 &lt;p&gt;&lt;ul&gt;
 A measurement job shall include:
 &lt;li&gt;a granularity specifying the rate at which performance data is read (scanned).
 &lt;li&gt;a reporting mode indicating the manner in which clients are notified of the generation
   of a measurement results.
 &lt;li&gt;a report format indicating the format of the result reports to be generated.
 &lt;li&gt;a schedule specifying the schedule of the monitoring activity.
 &lt;li&gt;a key that identify the measurement job.
 &lt;li&gt;a state of the measurement job.
 &lt;/ul&gt;

 &lt;p&gt;
 The granularity period is the time between the initiation of two successive gatherings
 of measurement data within the timeframe specified in the scheduling attributes.

 &lt;p&gt;
 The reporting mode is used to specify the reporting method of the measurement result
 reports of the measurement job.
 The reporting mode can be either file or event or both. If the reporting mode is
 set to event the system will emit an event that carries the measurement result reports.
 If the reporting mode is set to file, the measurement job will capture the measurement
 result reports into a data storage and then emit an event to the client about the
 availability of the data.  The frequency of this event is determined by the data
 storage creation frequency and can not be set by the client. If the reporting mode is set
 to both file and event both ways applies.
 When a client receives an event of data availability, the client can retrieve the data,
 by using the URL to make a connection to the system.
 If reporting mode is set to &lt;CODE&gt;ReportMode.FILE_SINGLE&lt;/CODE&gt; the reporting period specifies how
 often measurement result report will be generated.

 &lt;p&gt;
 The report format defines the format of the result reports to be generated.
 If the report mode is set to &lt;CODE&gt;ReportMode.FILE_MULTIPLE&lt;/CODE&gt; or &lt;CODE&gt;EVENT_MULTIPLE&lt;/CODE&gt; the
 client should not set the report format, it will be assigned by the server.

 &lt;p&gt;
 The measurement schedule specifies the time frames during which the measurement job
 will be active. The measurement job is active as soon as the start time - if supplied
 in the schedule - is reached. The system shall support a measurement job start time of
 up to at least 30 days from the measurement job creation date. If no start time is
 provided, the measurement job shall become active immediately. The measurement job
 remains active until the stop time - if supplied in the schedule - is reached. If no
 measurement job stop time is specified the measurement job will run indefinitely and can
 only be stopped by system intervention, i.e. by deleting or suspending the measurement
 job.
 The time frame defined by the measurement schedule may contain one or more recording
 intervals. These recording intervals may repeat on a daily and/or weekly basis and
 specify the time periods during which the measurement data is collected. The start time
 and end time define a recording interval, which lie between 00.00 and 24.00 hours,
 aligned on granularity period boundaries. Thus the length of a recording interval will
 be a multiple of the granularity period. If daily interval is omitted, the measurement
 job will run continuously through the day. If weekly schedule is omitted the measurement
 job will run all days of the week. Alternatively the weekly schedule will indicate which
 days of the week the measurement job will be run.
 The timer-synchronization between the client and the server is not part of this
 interface and is left over to the implementers.

 &lt;p&gt;
 The measurement job can have several states: Active and on duty, Active but of duty and
 suspended. The following shows how the states are changed in accordance to the schedule.

 &lt;p&gt;
 (A) Duration (A schedule represents by startTime and stopTime)
 &lt;p&gt;
 State Transition table (1), the startTime and stopTime is set
 &lt;blockquote&gt;&lt;pre&gt;
 ---------------------++------------------------+
   Time Stream        ||       Operation        |
                      ||     ---suspend()--&gt;    |
                      ||     &lt;--resume()----    |
 ---------------------++-----------+------------+
 1. before startTime  || off-duty  | suspended  |
 ---------------------++-----------+------------+&lt;&gt; startTime
 2. within schedule   || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; stopTime
 &lt;/blockquote&gt;&lt;/pre&gt;

 &lt;p&gt;State Transition table (2), the startTime is not set and the endTime is set.
 &lt;blockquote&gt;&lt;pre&gt;
 ---------------------++------------------------+
   Time Stream        ||       Operation        |
                      ||     ---suspend()--&gt;    |
                      ||     &lt;--resume()----    |
 ---------------------++-----------+------------+&lt;&gt; startTime not set
 1. within schedule   || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; stopTime
 &lt;/blockquote&gt;&lt;/pre&gt;
 &lt;p&gt;If startTime is not set means that monitoring will start immediately.

 &lt;p&gt;State Transition table (3), the startTime is set and the endTime is not set.
 &lt;blockquote&gt;&lt;pre&gt;
 ---------------------++------------------------+
   Time Stream        ||       Operation        |
                      ||     ---suspend()--&gt;    |
                      ||     &lt;--resume()----    |
 ---------------------++-----------+------------+
 1. before startTime  || off-duty  | suspended  |
 ---------------------++-----------+------------+&lt;&gt; startTime
 2. within schedule   || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; forever
 &lt;/blockquote&gt;&lt;/pre&gt;

 &lt;p&gt;(B) Daily Scheduling

 &lt;p&gt;The daily scheduling is set to have 4 elements, two start times and two stop times.

 &lt;p&gt;State Transition table (4)
 &lt;blockquote&gt;&lt;pre&gt;
 ---------------------++------------------------+
   Time Stream        ||       Operation        |
                      ||     ---suspend()--&gt;    |
                      ||     &lt;--resume()----    |
 ---------------------++-----------+------------+
 1. off schedule      || off-duty  | suspended  |
 ---------------------++-----------+------------+&lt;&gt; 1st element
 2. within schedule   || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; 2nd element
 3. off schedule      || off-duty  | suspended  |
 ---------------------++-----------+------------+&lt;&gt; 3rd element
 4. within schedule   || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; final element
 5. It will be back to 1. because of day-line crossing.
 &lt;/blockquote&gt;&lt;/pre&gt;

 &lt;p&gt;(C) Weekly Scheduling

 &lt;p&gt;The weekly scheduling is set to Monday and Friday and the daily scheduling is set
 to have 4 elements, as above.

 &lt;p&gt;State Transition table (5)
 &lt;blockquote&gt;&lt;pre&gt;
 ---------------------++------------------------+
   Time Stream        ||       Operation        |
                      ||     ---suspend()--&gt;    |
                      ||     &lt;--resume()----    |
 ---------------------++-----------+------------+
 1. off schedule      || off-duty  | suspended  |
    on Sunday         ||           |            |
 ---------------------++-----------+------------+
 2. off schedule      || off-duty  | suspended  |
    on Monday         ||           |            |
 ---------------------++-----------+------------+&lt;&gt; 1st element
 3. within schedule   || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; 2nd element
 4. off schedule      || off-duty  | suspended  |
 ---------------------++-----------+------------+&lt;&gt; 3rd element
 5. within schedule   || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; final element
 6. off schedule      || off-duty  | suspended  |
    on Monday         ||           |            |
 ---------------------++-----------+------------+
 7. off schedule      || off-duty  | suspended  |
  on Tuesday-Thursday ||           |            |
 ---------------------++-----------+------------+
 8. off schedule      || off-duty  | suspended  |
    on Friday         ||           |            |
 ---------------------++-----------+------------+&lt;&gt; 1st element
 9. within schedule   || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; 2nd element
 10. off schedule     || off-duty  | suspended  |
 ---------------------++-----------+------------+&lt;&gt; 3rd element
 11. within schedule  || on-duty   | suspended  |
 ---------------------++-----------+------------+&lt;&gt; final element
 12. off schedule     || off-duty  | suspended  |
    on Friday         ||           |            |
 ---------------------++-----------+------------+
 13. off schedule     || off-duty  | suspended  |
  on Saturday         ||           |            |
 ---------------------++-----------+------------+
 14. It will be back to 1. because of weekly-line crossing.
 &lt;/blockquote&gt;&lt;/pre&gt;</documentation>
      </annotation>
      <complexContent>
         <extension base="cbecore:EntityValue">
            <sequence>
               <element name="name" minOccurs="0" nillable="true" type="string" />
               <element name="granularityPeriod" minOccurs="0" nillable="true" type="int" />
               <element name="reportByFile" minOccurs="0" nillable="true" type="int" />
               <element name="reportByEvent" minOccurs="0" nillable="true" type="int" />
               <element name="reportPeriod" minOccurs="0" nillable="true" type="int" />
               <element name="reportFormat" minOccurs="0" nillable="true" type="cbereport:ReportFormat" />
               <element name="schedule" minOccurs="0" nillable="true" type="cbeschedule:Schedule" />
               <element name="state" minOccurs="0" nillable="true" type="int" />
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <complexType name="PerformanceMonitorKeyResult">
      <annotation>
         <documentation>This interface encapsulates all the information necessary to indicate the result
 of a BEST EFFORT operation on a specific measurement job.

 &lt;p&gt;
 The performance monitor key result is used in operations involving multiple
 measurement jobs, for example in the deletion or creation of multiple measurement
 jobs.

 &lt;p&gt;
 The interface contains the primary key of the measurement job, a boolean value
 indicating if the operation was successful for that measurement job and the
 reason why the operation failed.</documentation>
      </annotation>
      <complexContent>
         <extension base="cbecore:EntityKeyResult">
            <sequence>
               <element name="performanceMonitorKey" minOccurs="0" nillable="true" type="cbemeasurement:PerformanceMonitorKey" />
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <complexType name="PerformanceMonitorKey">
      <annotation>
         <documentation>This interface is the primary key of a performance monitor instance.

 &lt;p&gt;
 It identifies the created measurement job. The key of the measurement job is a unique
 identifier of the measurement job.</documentation>
      </annotation>
      <complexContent>
         <extension base="cbecore:EntityKey">
            <sequence>
               <element name="performanceMonitorPrimaryKey" minOccurs="0" nillable="true" type="string" />
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <complexType name="PerformanceMonitorByObjectsValue">
      <annotation>
         <documentation>This interface is the value representation of a measurement job that monitor a set of
 specified attributes on a set of observable object instances.

 &lt;p&gt;
 This interface extends the PerformanceMonitorValue interface with a new attribute:
 &lt;ul&gt;
 &lt;li&gt;a list of measurement attributes to monitor.
 &lt;li&gt;a list of observable object instances.
 &lt;/ul&gt;

 &lt;p&gt;
 The new attributes, of the value object, are a list of observed object instances that
 shall be monitored and an optional list of measurement attributes, that identify what
 is monitored by the measurement job.
 If the measurement attribute list is omitted, all measurement attributes in the observed
 object instances will be monitored (scanned). The observable object instances should be of the
 same type.</documentation>
      </annotation>
      <complexContent>
         <extension base="cbemeasurement:PerformanceMonitorValue">
            <sequence>
               <element name="measurementAttributes" minOccurs="0" nillable="true" type="cbemeasurement:ArrayOfPerformanceAttributeDescriptor" />
               <element name="observedObjects" minOccurs="0" nillable="true" type="co:ArrayOfString" />
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <complexType name="PerformanceMonitorByObjectsKey">
      <annotation>
         <documentation>A PerformanceMonitorByObjectsKey type.</documentation>
      </annotation>
      <complexContent>
         <extension base="cbemeasurement:PerformanceMonitorKey">
            <sequence />
         </extension>
      </complexContent>
   </complexType>
   <complexType name="PerformanceMonitorByClassesValue">
      <annotation>
         <documentation>This interface is the value representation of a measurement job that monitor a set of
 specified attributes on a set of observable object classes.

 &lt;p&gt;
 This interface extends the PerformanceMonitorValue interface with a new attribute:
 &lt;ul&gt;
 &lt;li&gt;a list of measurement attributes to monitor.
 &lt;li&gt;a list of Observable Object classes.
 &lt;li&gt;a scope that define from where to find the observable object classes.
 &lt;/ul&gt;

 &lt;p&gt;
 The new attributes, of the value object, are a list of observed object classes that
 shall be monitored, with a scope, and an optional list of measurement attributes, that
 identify what is monitored by the measurement job.
 If the measurement attribute list is omitted, all measurement attributes in the observed
 object instances will be monitored (scanned).</documentation>
      </annotation>
      <complexContent>
         <extension base="cbemeasurement:PerformanceMonitorValue">
            <sequence>
               <element name="measurementAttributes" minOccurs="0" nillable="true" type="cbemeasurement:ArrayOfPerformanceAttributeDescriptor" />
               <element name="observedObjectClasses" minOccurs="0" nillable="true" type="co:ArrayOfString" />
               <element name="scope" minOccurs="0" nillable="true" type="string" />
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <complexType name="PerformanceMonitorByClassesKey">
      <annotation>
         <documentation>A PerformanceMonitorByClassesKey type.</documentation>
      </annotation>
      <complexContent>
         <extension base="cbemeasurement:PerformanceMonitorKey">
            <sequence />
         </extension>
      </complexContent>
   </complexType>
   <complexType name="PerformanceAttributeDescriptor">
      <annotation>
         <documentation>Represent a measurement attribute that can be monitored in the observable object class.

 &lt;p&gt;
 The measurement attribute name is short form of the measurement name and it is used to
 identify the measurement attribute in the measurement result reports.

 &lt;p&gt;
 The type of the measurement can be:
 &lt;ul&gt;
   &lt;li&gt;Integer
   &lt;li&gt;Real
   &lt;li&gt;String
 &lt;/ul&gt;

 &lt;p&gt;
 Each measurement job will be collecting result data at a particular frequency,
 known as the granularity period of the measurement. At the end of the granularity period
 a scheduled result report shall be generated for each measurement job that is actively
 collecting performance measurement data. The measurement data can be collected in a number of ways:
 &lt;ul&gt;
   &lt;li&gt;cumulative incremental counters triggered by the occurrence of the measured event;
   &lt;li&gt;status inspection (i.e. a mechanism for high frequency sampling of internal counters at pre-defined rates);
   &lt;li&gt;gauges (i.e. high tide mark, low tide mark);
   &lt;li&gt;discrete event registration, where data related to a particular event is captured.
 &lt;/ul&gt;</documentation>
      </annotation>
      <sequence>
         <element name="name" minOccurs="0" nillable="true" type="string" />
         <element name="type" minOccurs="0" nillable="true" type="int" />
         <element name="collectionMethod" minOccurs="0" nillable="true" type="string" />
         <element name="array" minOccurs="0" nillable="true" type="boolean" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfThresholdDefinition">
      <sequence>
         <element name="item" type="cbemeasurement:ThresholdDefinition" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfQueryPerformanceMonitorValue">
      <sequence>
         <element name="item" type="cbemeasurement:QueryPerformanceMonitorValue" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfPerformanceMonitorValue">
      <sequence>
         <element name="item" type="cbemeasurement:PerformanceMonitorValue" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfPerformanceMonitorKeyResult">
      <sequence>
         <element name="item" type="cbemeasurement:PerformanceMonitorKeyResult" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfPerformanceMonitorKey">
      <sequence>
         <element name="item" type="cbemeasurement:PerformanceMonitorKey" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfPerformanceMonitorByObjectsValue">
      <sequence>
         <element name="item" type="cbemeasurement:PerformanceMonitorByObjectsValue" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfPerformanceAttributeDescriptor">
      <sequence>
         <element name="item" type="cbemeasurement:PerformanceAttributeDescriptor" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfPerformanceMonitorByObjectsKey">
      <sequence>
         <element name="item" type="cbemeasurement:PerformanceMonitorByObjectsKey" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfPerformanceMonitorByClassesValue">
      <sequence>
         <element name="item" type="cbemeasurement:PerformanceMonitorByClassesValue" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ArrayOfPerformanceMonitorByClassesKey">
      <sequence>
         <element name="item" type="cbemeasurement:PerformanceMonitorByClassesKey" nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
   </complexType>
</schema>