This project has retired. For details please refer to its Attic page.
WSDMQosConstants xref
View Javadoc
1   /*
2    * Copyright 2013 The Apache Software Foundation.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.apache.juddi.v3.client.ext.wsdm;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  /**
22   * Defines constants for OASIS's WSDM specification. Specifically tModels for
23   * use in UDDI
24   * https://www.oasis-open.org/committees/download.php/6227/uddi-spec-tc-tn-QoS-metrics-20040224.doc
25   *
26   * @author Alex O'Ree
27   */
28  public abstract class WSDMQosConstants {
29  
30          /**
31           * This is the 'for more information' url for WSDM + UDDI
32           */
33          public static final String moreInfoUrl = "https://www.oasis-open.org/committees/download.php/6227/uddi-spec-tc-tn-QoS-metrics-20040224.doc";
34          public static final String WSDM_KEYGEN = "urn:wsdm.org:keygenerator";
35          public static final String WSDM_METRIC_KEYGEN = "urn:wsdm.org:metric:keygenerator";
36          public static final String WSDM_IDENTITY_KEYGEN = "urn:wsdm.org:identity:keygenerator";
37          public static final String WSDM_QOS_KEYGEN = "urn:wsdm.org:qos:keygenerator";
38          /**
39           * The number of requests to a given service. (number of requests)
40           */
41          public static final String METRIC_REQUEST_COUNT_KEY = "urn:wsdm.org:metric:requestcount";
42          /**
43           * The number of requests to a given service. (number of requests)
44           */
45          public static final String METRIC_RequestCount = "RequestCount";
46          /**
47           * The number of replies from a given service. (number of replies)
48           */
49          public static final String METRIC_REPLY_COUNT_KEY = "urn:wsdm.org:metric:replycount";
50           /**
51           * The number of replies from a given service. (number of replies)
52           */
53          public static final String METRIC_ReplyCount = "ReplyCount";
54          /**
55           * The number of faults from a given service. (number of faults)
56           */
57          public static final String METRIC_FAULT_COUNT_KEY = "urn:wsdm.org:metric:faultcount";
58          /**
59           * The number of faults from a given service. (number of faults)
60           */
61          public static final String METRIC_FaultCount = "FaultCount";
62          /**
63           * This is the unique identity by which the resource (service) is known
64           * to the management system. It is useful for further queries. (resource
65           * identification in URI format)
66           */
67          public static final String IDENTITY_RESOURCE_ID_KEY = "urn:wsdm.org:identity:resourceId";
68          /**
69           * This is the unique identity by which the resource (service) is known
70           * to the management system. It is useful for further queries. (resource
71           * identification in URI format)
72           */
73          public static final String IDENTITY_ResourceId = "ResourceId";
74          /**
75           * Represents the last time this metric was updated. (time value)
76           */
77          public static final String METRIC_LAST_UPDATE_TIME_KEY = "urn:wsdm.org:metric:lastupdatetime";
78          /**
79           * Represents the last time this metric was updated. (time value)
80           */
81          public static final String METRIC_LastUpdateTime = "LastUpdateTime";
82          /**
83           * Average response time of the service. (numeric value or symbolic
84           * rating)
85           */
86          public static final String QOS_RESPONSE_TIME_AVG_KEY = "urn:wsdm.org:qos:responsetime_average";
87          /**
88           * Average response time of the service. (numeric value or symbolic
89           * rating)
90           */
91          public static final String QOS_ResponseTime_Average = "ResponseTime_Average";
92          /**
93           * Throughput count. (numeric value or symbolic rating)
94           */
95          public static final String QOS_THROUGHPUT_COUNT_KEY = "urn:wsdm.org:qos:throughput_count";
96          public static final String QOS_Throughput_count = "Throughput_count";
97          /**
98           * Throughput bytes. (numeric value or symbolic rating)
99           */
100         public static final String QOS_THROUGHPUT_BYTES_KEY = "urn:wsdm.org:qos:throughput_bytes";
101         /**
102          * Throughput bytes. (numeric value or symbolic rating)
103          */
104         public static final String QOS_Throughput_bytes = "Throughput_bytes";
105         /**
106          * Reliability or the measure of. (numeric value or symbolic rating)
107          */
108         public static final String QOS_RELIABILITY_KEY = "urn:wsdm.org:qos:reliability";
109         /**
110          * Reliability or the measure of. (numeric value or symbolic rating)
111          */
112         public static final String QOS_Reliability = "Reliability";
113         /**
114          * The beginning on the reporting time period used for the information
115          * above. (dateTime)
116          */
117         public static final String QOS_REPORTING_PERIOD_START_KEY = "urn:wsdm.org:qos:reportingperiodstart";
118         /**
119          * The beginning on the reporting time period used for the information
120          * above. (dateTime)
121          */
122         public static final String QOS_ReportingPeriodStart = "ReportingPeriodStart";
123         /**
124          * The end of the reporting time period used for the information above.
125          * (dateTime)
126          */
127         public static final String QOS_REPORTING_PERIOD_END_KEY = "urn:wsdm.org:qos:reportingperiodend";
128         /**
129          * The end of the reporting time period used for the information above.
130          * (dateTime)
131          */
132         public static final String QOS_ReportingPeriodEnd = "ReportingPeriodEnd";
133         /**
134          * How often is this information updated in UDDI (it is not assumed to
135          * be realtime). (duration)
136          */
137         public static final String QOS_UPDATE_INTERVAL_KEY = "urn:wsdm.org:qos:updateinterval";
138         /**
139          * How often is this information updated in UDDI (it is not assumed to
140          * be realtime). (duration)
141          */
142         public static final String QOS_UpdateInterval = "UpdateInterval";
143 
144         public static List<String> getAllQOSKeys() {
145                 List<String> x = new ArrayList<String>();
146                 x.add(WSDMQosConstants.METRIC_FAULT_COUNT_KEY);
147                 x.add(WSDMQosConstants.METRIC_LAST_UPDATE_TIME_KEY);
148                 x.add(WSDMQosConstants.METRIC_REPLY_COUNT_KEY);
149                 x.add(WSDMQosConstants.METRIC_REQUEST_COUNT_KEY);
150                 x.add(WSDMQosConstants.QOS_RELIABILITY_KEY);
151                 x.add(WSDMQosConstants.QOS_REPORTING_PERIOD_END_KEY);
152                 x.add(WSDMQosConstants.QOS_REPORTING_PERIOD_START_KEY);
153                 x.add(WSDMQosConstants.QOS_RESPONSE_TIME_AVG_KEY);
154                 x.add(WSDMQosConstants.QOS_THROUGHPUT_BYTES_KEY);
155                 x.add(WSDMQosConstants.QOS_THROUGHPUT_COUNT_KEY);
156                 x.add(WSDMQosConstants.QOS_UPDATE_INTERVAL_KEY);
157                 x.add(WSDMQosConstants.IDENTITY_RESOURCE_ID_KEY);
158                 return x;
159         }
160 }