KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > excalibur > instrument > client > InstrumentData


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14  * implied.
15  *
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */

19
20 package org.apache.excalibur.instrument.client;
21
22 public interface InstrumentData
23     extends ElementData
24 {
25     /** Type which specifies that the type of a Instrument has not yet been determined. */
26     int INSTRUMENT_TYPE_NONE = 0;
27     
28     /** Type which identifies CounterInstruments. */
29     int INSTRUMENT_TYPE_COUNTER = 1;
30     
31     /** Type which identifies ValueInstruments. */
32     int INSTRUMENT_TYPE_VALUE = 2;
33     
34     /**
35      * Returns the registered flag of the remote object.
36      *
37      * @return The registered flag of the remote object.
38      */

39     boolean isRegistered();
40     
41     /**
42      * Returns the type of the Instrument. Possible values include
43      * InstrumentData.INSTRUMENT_TYPE_COUNTER,
44      * InstrumentData.INSTRUMENT_TYPE_VALUE or
45      * InstrumentData.INSTRUMENT_TYPE_NONE, if the type was never set.
46      *
47      * @return The type of the Instrument.
48      */

49     int getType();
50     
51     /**
52      * Returns an array of the Instrument Samples assigned to the Instrument.
53      *
54      * @return An array of Instrument Samples.
55      */

56     InstrumentSampleData[] getInstrumentSamples();
57     
58     /**
59      * Requests that a sample be created or that its lease be updated.
60      *
61      * @param description Description to assign to the new sample.
62      * @param interval Sample interval of the new sample.
63      * @param sampleCount Number of samples in the new sample.
64      * @param leaseTime Requested lease time. The server may not grant the full lease.
65      * @param sampleType The type of sample to be created.
66      *
67      * @return True if successful.
68      */

69     boolean createInstrumentSample( String JavaDoc description,
70                                     long interval,
71                                     int sampleCount,
72                                     long leaseTime,
73                                     int sampleType );
74 }
75
Popular Tags