KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > osgi > service > wireadmin > WireConstants


1 /*
2  * $Header: /cvshome/build/org.osgi.service.wireadmin/src/org/osgi/service/wireadmin/WireConstants.java,v 1.10 2006/07/11 00:54:10 hargrave Exp $
3  *
4  * Copyright (c) OSGi Alliance (2002, 2006). All Rights Reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.osgi.service.wireadmin;
19
20 /**
21  * Defines standard names for <code>Wire</code> properties, wire filter
22  * attributes, Consumer and Producer service properties.
23  *
24  * @version $Revision: 1.10 $
25  */

26 public interface WireConstants {
27     /**
28      * <code>Wire</code> property key (named <code>wireadmin.pid</code>) specifying
29      * the persistent identity (PID) of this <code>Wire</code> object.
30      *
31      * <p>
32      * Each <code>Wire</code> object has a PID to allow unique and persistent
33      * identification of a specific <code>Wire</code> object. The PID must be
34      * generated by the {@link WireAdmin} service when the <code>Wire</code>
35      * object is created.
36      *
37      * <p>
38      * This wire property is automatically set by the Wire Admin service. The
39      * value of the property must be of type <code>String</code>.
40      */

41     public final static String JavaDoc WIREADMIN_PID = "wireadmin.pid";
42     /**
43      * A service registration property for a Producer service that is composite.
44      * It contains the names of the composite Consumer services it can
45      * inter-operate with. Inter-operability exists when any name in this array
46      * matches any name in the array set by the Consumer service. The type of
47      * this property must be <code>String[]</code>.
48      */

49     public final static String JavaDoc WIREADMIN_PRODUCER_COMPOSITE = "wireadmin.producer.composite";
50     /**
51      * A service registration property for a Consumer service that is composite.
52      * It contains the names of the composite Producer services it can cooperate
53      * with. Inter-operability exists when any name in this array matches any
54      * name in the array set by the Producer service. The type of this property
55      * must be <code>String[]</code>.
56      */

57     public final static String JavaDoc WIREADMIN_CONSUMER_COMPOSITE = "wireadmin.consumer.composite";
58     /**
59      * Service registration property key (named
60      * <code>wireadmin.producer.scope</code>) specifying a list of names that may
61      * be used to define the scope of this <code>Wire</code> object. A Producer
62      * service should set this service property when it can produce more than
63      * one kind of value. This property is only used during registration,
64      * modifying the property must not have any effect of the <code>Wire</code>
65      * object's scope. Each name in the given list mist have
66      * <code>WirePermission[name,PRODUCE]</code> or else is ignored. The type of
67      * this service registration property must be <code>String[]</code>.
68      *
69      * @see Wire#getScope
70      * @see #WIREADMIN_CONSUMER_SCOPE
71      */

72     public final static String JavaDoc WIREADMIN_PRODUCER_SCOPE = "wireadmin.producer.scope";
73     /**
74      * Service registration property key (named
75      * <code>wireadmin.consumer.scope</code>) specifying a list of names that may
76      * be used to define the scope of this <code>Wire</code> object. A
77      * <code>Consumer</code> service should set this service property when it can
78      * produce more than one kind of value. This property is only used during
79      * registration, modifying the property must not have any effect of the
80      * <code>Wire</code> object's scope. Each name in the given list mist have
81      * <code>WirePermission[name,CONSUME]</code> or else is ignored. The type of this
82      * service registration property must be <code>String[]</code>.
83      *
84      * @see Wire#getScope
85      * @see #WIREADMIN_PRODUCER_SCOPE
86      */

87     public final static String JavaDoc WIREADMIN_CONSUMER_SCOPE = "wireadmin.consumer.scope";
88     /**
89      * Matches all scope names.
90      */

91     public final static String JavaDoc WIREADMIN_SCOPE_ALL[] = {"*"};
92     /**
93      * <code>Wire</code> property key (named <code>wireadmin.producer.pid</code>)
94      * specifying the <code>service.pid</code> of the associated Producer service.
95      *
96      * <p>
97      * This wire property is automatically set by the WireAdmin service. The
98      * value of the property must be of type <code>String</code>.
99      */

100     public final static String JavaDoc WIREADMIN_PRODUCER_PID = "wireadmin.producer.pid";
101     /**
102      * <code>Wire</code> property key (named <code>wireadmin.consumer.pid</code>)
103      * specifying the <code>service.pid</code> of the associated Consumer service.
104      *
105      * <p>
106      * This wire property is automatically set by the Wire Admin service. The
107      * value of the property must be of type <code>String</code>.
108      */

109     public final static String JavaDoc WIREADMIN_CONSUMER_PID = "wireadmin.consumer.pid";
110     /**
111      * <code>Wire</code> property key (named <code>wireadmin.filter</code>)
112      * specifying a filter used to control the delivery rate of data between the
113      * Producer and the Consumer service.
114      *
115      * <p>
116      * This property should contain a filter as described in the <code>Filter</code>
117      * class. The filter can be used to specify when an updated value from the
118      * Producer service should be delivered to the Consumer service. In many
119      * cases the Consumer service does not need to receive the data with the
120      * same rate that the Producer service can generate data. This property can
121      * be used to control the delivery rate.
122      * <p>
123      * The filter can use a number of pre-defined attributes that can be used to
124      * control the delivery of new data values. If the filter produces a match
125      * upon the wire filter attributes, the Consumer service should be notifed
126      * of the updated data value.
127      * <p>
128      * If the Producer service was registered with the
129      * {@link #WIREADMIN_PRODUCER_FILTERS} service property indicating that the
130      * Producer service will perform the data filtering then the <code>Wire</code>
131      * object will not perform data filtering. Otherwise, the <code>Wire</code>
132      * object must perform basic filtering. Basic filtering includes supporting
133      * the following standard wire filter attributes:
134      * <ul>
135      * <li>{@link #WIREVALUE_CURRENT}- Current value
136      * <li>{@link #WIREVALUE_PREVIOUS}- Previous value
137      * <li>{@link #WIREVALUE_DELTA_ABSOLUTE}- Absolute delta
138      * <li>{@link #WIREVALUE_DELTA_RELATIVE}- Relative delta
139      * <li>{@link #WIREVALUE_ELAPSED}- Elapsed time
140      * </ul>
141      *
142      * @see org.osgi.framework.Filter
143      */

144     public final static String JavaDoc WIREADMIN_FILTER = "wireadmin.filter";
145     /* Wire filter attribute names. */
146     /**
147      * <code>Wire</code> object's filter attribute (named
148      * <code>wirevalue.current</code>) representing the current value.
149      */

150     public final static String JavaDoc WIREVALUE_CURRENT = "wirevalue.current";
151     /**
152      * <code>Wire</code> object's filter attribute (named
153      * <code>wirevalue.previous</code>) representing the previous value.
154      */

155     public final static String JavaDoc WIREVALUE_PREVIOUS = "wirevalue.previous";
156     /**
157      * <code>Wire</code> object's filter attribute (named
158      * <code>wirevalue.delta.absolute</code>) representing the absolute delta.
159      * The absolute (always positive) difference between the last update and the
160      * current value (only when numeric). This attribute must not be used when
161      * the values are not numeric.
162      */

163     public final static String JavaDoc WIREVALUE_DELTA_ABSOLUTE = "wirevalue.delta.absolute";
164     /**
165      * <code>Wire</code> object's filter attribute (named
166      * <code>wirevalue.delta.relative</code>) representing the relative delta.
167      * The relative difference is |<code>previous</code>-<code>current</code> |/|
168      * <code>current</code>| (only when numeric). This attribute must not be used
169      * when the values are not numeric.
170      */

171     public final static String JavaDoc WIREVALUE_DELTA_RELATIVE = "wirevalue.delta.relative";
172     /**
173      * <code>Wire</code> object's filter attribute (named
174      * <code>wirevalue.elapsed</code>) representing the elapsed time, in ms,
175      * between this filter evaluation and the last update of the
176      * <code>Consumer</code> service.
177      */

178     public final static String JavaDoc WIREVALUE_ELAPSED = "wirevalue.elapsed";
179     /* Service registration property key names. */
180     /**
181      * Service Registration property (named <code>wireadmin.producer.filters</code>).
182      * A <code>Producer</code> service registered with this property indicates to
183      * the Wire Admin service that the Producer service implements at least the
184      * filtering as described for the {@link #WIREADMIN_FILTER} property. If the
185      * Producer service is not registered with this property, the <code>Wire</code>
186      * object must perform the basic filtering as described in
187      * {@link #WIREADMIN_FILTER}.
188      *
189      * <p>
190      * The type of the property value is not relevant. Only its presence is
191      * relevant.
192      */

193     public final static String JavaDoc WIREADMIN_PRODUCER_FILTERS = "wireadmin.producer.filters";
194     /**
195      * Service Registration property (named <code>wireadmin.consumer.flavors</code>)
196      * specifying the list of data types understood by this Consumer service.
197      *
198      * <p>
199      * The Consumer service object must be registered with this service
200      * property. The list must be in the order of preference with the first type
201      * being the most preferred. The value of the property must be of type
202      * <code>Class[]</code>.
203      */

204     public final static String JavaDoc WIREADMIN_CONSUMER_FLAVORS = "wireadmin.consumer.flavors";
205     /**
206      * Service Registration property (named <code>wireadmin.producer.flavors</code>)
207      * specifying the list of data types available from this Producer service.
208      *
209      * <p>
210      * The Producer service object should be registered with this service
211      * property.
212      *
213      * <p>
214      * The value of the property must be of type <code>Class[]</code>.
215      */

216     public final static String JavaDoc WIREADMIN_PRODUCER_FLAVORS = "wireadmin.producer.flavors";
217     /**
218      * Service Registration property (named <code>wireadmin.events</code>)
219      * specifying the <code>WireAdminEvent</code> type of interest to a Wire Admin
220      * Listener service. The value of the property is a bitwise OR of all the
221      * <code>WireAdminEvent</code> types the Wire Admin Listener service wishes to
222      * receive and must be of type <code>Integer</code>.
223      *
224      * @see WireAdminEvent
225      */

226     public final static String JavaDoc WIREADMIN_EVENTS = "wireadmin.events";
227 }
228
Popular Tags