/usr/share/doc/libosgi-compendium-java/api/org/osgi/service/wireadmin/Wire.html is in libosgi-compendium-java-doc 4.3.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_23) on Mon Nov 21 22:05:27 UTC 2011 -->
<TITLE>
Wire
</TITLE>
<META NAME="date" CONTENT="2011-11-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Wire";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/osgi/service/wireadmin/Producer.html" title="interface in org.osgi.service.wireadmin"><B>PREV CLASS</B></A>
<A HREF="../../../../org/osgi/service/wireadmin/WireAdmin.html" title="interface in org.osgi.service.wireadmin"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/osgi/service/wireadmin/Wire.html" target="_top"><B>FRAMES</B></A>
<A HREF="Wire.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.osgi.service.wireadmin</FONT>
<BR>
Interface Wire</H2>
<HR>
<DL>
<DT><PRE>public interface <B>Wire</B></DL>
</PRE>
<P>
A connection between a Producer service and a Consumer service.
<p>
A <code>Wire</code> object connects a Producer service to a Consumer service. Both
the Producer and Consumer services are identified by their unique
<code>service.pid</code> values. The Producer and Consumer services may
communicate with each other via <code>Wire</code> objects that connect them. The
Producer service may send updated values to the Consumer service by calling
the <A HREF="../../../../org/osgi/service/wireadmin/Wire.html#update(java.lang.Object)"><CODE>update(Object)</CODE></A> method. The Consumer service may request an
updated value from the Producer service by calling the <A HREF="../../../../org/osgi/service/wireadmin/Wire.html#poll()"><CODE>poll()</CODE></A>
method.
<p>
A Producer service and a Consumer service may be connected through multiple
<code>Wire</code> objects.
<p>
Security Considerations. <code>Wire</code> objects are available to Producer and
Consumer services connected to a given <code>Wire</code> object and to bundles
which can access the <code>WireAdmin</code> service. A bundle must have
<code>ServicePermission[WireAdmin,GET]</code> to get the <code>WireAdmin</code> service
to access all <code>Wire</code> objects. A bundle registering a Producer service
or a Consumer service must have the appropriate
<code>ServicePermission[Consumer|Producer,REGISTER]</code> to register the service
and will be passed <code>Wire</code> objects when the service object's
<code>consumersConnected</code> or <code>producersConnected</code> method is called.
<p>
Scope. Each Wire object can have a scope set with the <code>setScope</code>
method. This method should be called by a Consumer service when it assumes a
Producer service that is composite (supports multiple information items). The
names in the scope must be verified by the <code>Wire</code> object before it is
used in communication. The semantics of the names depend on the Producer
service and must not be interpreted by the Wire Admin service.
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.Class[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#getFlavors()">getFlavors</A></B>()</CODE>
<BR>
Return the list of data types understood by the Consumer service
connected to this <code>Wire</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#getLastValue()">getLastValue</A></B>()</CODE>
<BR>
Return the last value sent through this <code>Wire</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Dictionary</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#getProperties()">getProperties</A></B>()</CODE>
<BR>
Return the wire properties for this <code>Wire</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#getScope()">getScope</A></B>()</CODE>
<BR>
Return the calculated scope of this <code>Wire</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#hasScope(java.lang.String)">hasScope</A></B>(java.lang.String name)</CODE>
<BR>
Return true if the given name is in this <code>Wire</code> object's scope.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#isConnected()">isConnected</A></B>()</CODE>
<BR>
Return the connection state of this <code>Wire</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#isValid()">isValid</A></B>()</CODE>
<BR>
Return the state of this <code>Wire</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#poll()">poll</A></B>()</CODE>
<BR>
Poll for an updated value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/osgi/service/wireadmin/Wire.html#update(java.lang.Object)">update</A></B>(java.lang.Object value)</CODE>
<BR>
Update the value.</TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="isValid()"><!-- --></A><H3>
isValid</H3>
<PRE>
boolean <B>isValid</B>()</PRE>
<DL>
<DD>Return the state of this <code>Wire</code> object.
<p>
A connected <code>Wire</code> must always be disconnected before becoming
invalid.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>false</code> if this <code>Wire</code> object is invalid because it
has been deleted via <A HREF="../../../../org/osgi/service/wireadmin/WireAdmin.html#deleteWire(org.osgi.service.wireadmin.Wire)"><CODE>WireAdmin.deleteWire(Wire)</CODE></A>;
<code>true</code> otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isConnected()"><!-- --></A><H3>
isConnected</H3>
<PRE>
boolean <B>isConnected</B>()</PRE>
<DL>
<DD>Return the connection state of this <code>Wire</code> object.
<p>
A <code>Wire</code> is connected after the Wire Admin service receives
notification that the Producer service and the Consumer service for this
<code>Wire</code> object are both registered. This method will return
<code>true</code> prior to notifying the Producer and Consumer services via
calls to their respective <code>consumersConnected</code> and
<code>producersConnected</code> methods.
<p>
A <code>WireAdminEvent</code> of type <A HREF="../../../../org/osgi/service/wireadmin/WireAdminEvent.html#WIRE_CONNECTED"><CODE>WireAdminEvent.WIRE_CONNECTED</CODE></A>
must be broadcast by the Wire Admin service when the <code>Wire</code>
becomes connected.
<p>
A <code>Wire</code> object is disconnected when either the Consumer or
Producer service is unregistered or the <code>Wire</code> object is
deleted.
<p>
A <code>WireAdminEvent</code> of type
<A HREF="../../../../org/osgi/service/wireadmin/WireAdminEvent.html#WIRE_DISCONNECTED"><CODE>WireAdminEvent.WIRE_DISCONNECTED</CODE></A> must be broadcast by the Wire
Admin service when the <code>Wire</code> becomes disconnected.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if both the Producer and Consumer for this
<code>Wire</code> object are connected to the <code>Wire</code>
object; <code>false</code> otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="getFlavors()"><!-- --></A><H3>
getFlavors</H3>
<PRE>
java.lang.Class[] <B>getFlavors</B>()</PRE>
<DL>
<DD>Return the list of data types understood by the Consumer service
connected to this <code>Wire</code> object. Note that subclasses of the
classes in this list are acceptable data types as well.
<p>
The list is the value of the
<A HREF="../../../../org/osgi/service/wireadmin/WireConstants.html#WIREADMIN_CONSUMER_FLAVORS"><CODE>WireConstants.WIREADMIN_CONSUMER_FLAVORS</CODE></A> service property of the
Consumer service object connected to this object. If no such property was
registered or the type of the property value is not <code>Class[]</code>,
this method must return <code>null</code>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>An array containing the list of classes understood by the
Consumer service or <code>null</code> if the <code>Wire</code> is not
connected, or the consumer did not register a
<A HREF="../../../../org/osgi/service/wireadmin/WireConstants.html#WIREADMIN_CONSUMER_FLAVORS"><CODE>WireConstants.WIREADMIN_CONSUMER_FLAVORS</CODE></A> property or the
value of the property is not of type <code>Class[]</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="update(java.lang.Object)"><!-- --></A><H3>
update</H3>
<PRE>
void <B>update</B>(java.lang.Object value)</PRE>
<DL>
<DD>Update the value.
<p>
This methods is called by the Producer service to notify the Consumer
service connected to this <code>Wire</code> object of an updated value.
<p>
If the properties of this <code>Wire</code> object contain a
<A HREF="../../../../org/osgi/service/wireadmin/WireConstants.html#WIREADMIN_FILTER"><CODE>WireConstants.WIREADMIN_FILTER</CODE></A> property, then filtering is
performed. If the Producer service connected to this <code>Wire</code> object
was registered with the service property
<A HREF="../../../../org/osgi/service/wireadmin/WireConstants.html#WIREADMIN_PRODUCER_FILTERS"><CODE>WireConstants.WIREADMIN_PRODUCER_FILTERS</CODE></A>, the Producer service
will perform the filtering according to the rules specified for the
filter. Otherwise, this <code>Wire</code> object will perform the filtering of
the value.
<p>
If no filtering is done, or the filter indicates the updated value should
be delivered to the Consumer service, then this <code>Wire</code> object must
call the <A HREF="../../../../org/osgi/service/wireadmin/Consumer.html#updated(org.osgi.service.wireadmin.Wire, java.lang.Object)"><CODE>Consumer.updated(Wire, Object)</CODE></A> method with the updated
value. If this <code>Wire</code> object is not connected, then the Consumer
service must not be called and the value is ignored.
<p>
If the value is an <code>Envelope</code> object, and the scope name is not
permitted, then the <code>Wire</code> object must ignore this call and not
transfer the object to the Consumer service.
<p>
A <code>WireAdminEvent</code> of type <A HREF="../../../../org/osgi/service/wireadmin/WireAdminEvent.html#WIRE_TRACE"><CODE>WireAdminEvent.WIRE_TRACE</CODE></A> must
be broadcast by the Wire Admin service after the Consumer service has
been successfully called.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The updated value. The value should be an instance of one of
the types returned by <A HREF="../../../../org/osgi/service/wireadmin/Wire.html#getFlavors()"><CODE>getFlavors()</CODE></A>.<DT><B>See Also:</B><DD><A HREF="../../../../org/osgi/service/wireadmin/WireConstants.html#WIREADMIN_FILTER"><CODE>WireConstants.WIREADMIN_FILTER</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="poll()"><!-- --></A><H3>
poll</H3>
<PRE>
java.lang.Object <B>poll</B>()</PRE>
<DL>
<DD>Poll for an updated value.
<p>
This methods is normally called by the Consumer service to request an
updated value from the Producer service connected to this <code>Wire</code>
object. This <code>Wire</code> object will call the
<A HREF="../../../../org/osgi/service/wireadmin/Producer.html#polled(org.osgi.service.wireadmin.Wire)"><CODE>Producer.polled(Wire)</CODE></A> method to obtain an updated value. If this
<code>Wire</code> object is not connected, then the Producer service must not
be called.
<p>
If this <code>Wire</code> object has a scope, then this method must return an
array of <code>Envelope</code> objects. The objects returned must match the
scope of this object. The <code>Wire</code> object must remove all
<code>Envelope</code> objects with a scope name that is not in the
<code>Wire</code> object's scope. Thus, the list of objects returned must only
contain <code>Envelope</code> objects with a permitted scope name. If the
array becomes empty, <code>null</code> must be returned.
<p>
A <code>WireAdminEvent</code> of type <A HREF="../../../../org/osgi/service/wireadmin/WireAdminEvent.html#WIRE_TRACE"><CODE>WireAdminEvent.WIRE_TRACE</CODE></A> must
be broadcast by the Wire Admin service after the Producer service has
been successfully called.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>A value whose type should be one of the types returned by
<A HREF="../../../../org/osgi/service/wireadmin/Wire.html#getFlavors()"><CODE>getFlavors()</CODE></A>,<code>Envelope[]</code>, or <code>null</code> if the
<code>Wire</code> object is not connected, the Producer service threw
an exception, or the Producer service returned a value which is
not an instance of one of the types returned by
<A HREF="../../../../org/osgi/service/wireadmin/Wire.html#getFlavors()"><CODE>getFlavors()</CODE></A>.</DL>
</DD>
</DL>
<HR>
<A NAME="getLastValue()"><!-- --></A><H3>
getLastValue</H3>
<PRE>
java.lang.Object <B>getLastValue</B>()</PRE>
<DL>
<DD>Return the last value sent through this <code>Wire</code> object.
<p>
The returned value is the most recent, valid value passed to the
<A HREF="../../../../org/osgi/service/wireadmin/Wire.html#update(java.lang.Object)"><CODE>update(Object)</CODE></A> method or returned by the <A HREF="../../../../org/osgi/service/wireadmin/Wire.html#poll()"><CODE>poll()</CODE></A> method
of this object. If filtering is performed by this <code>Wire</code> object,
this methods returns the last value provided by the Producer service.
This value may be an <code>Envelope[]</code> when the Producer service uses
scoping. If the return value is an Envelope object (or array), it must be
verified that the Consumer service has the proper WirePermission to see
it.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The last value passed though this <code>Wire</code> object or
<code>null</code> if no valid values have been passed or the Consumer
service has no permission.</DL>
</DD>
</DL>
<HR>
<A NAME="getProperties()"><!-- --></A><H3>
getProperties</H3>
<PRE>
java.util.Dictionary <B>getProperties</B>()</PRE>
<DL>
<DD>Return the wire properties for this <code>Wire</code> object.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The properties for this <code>Wire</code> object. The returned
<code>Dictionary</code> must be read only.</DL>
</DD>
</DL>
<HR>
<A NAME="getScope()"><!-- --></A><H3>
getScope</H3>
<PRE>
java.lang.String[] <B>getScope</B>()</PRE>
<DL>
<DD>Return the calculated scope of this <code>Wire</code> object.
The purpose of the <code>Wire</code> object's scope is to allow a Producer
and/or Consumer service to produce/consume different types over a single
<code>Wire</code> object (this was deemed necessary for efficiency
reasons). Both the Consumer service and the Producer service must set an
array of scope names (their scope) with the service registration property
<code>WIREADMIN_PRODUCER_SCOPE</code>, or
<code>WIREADMIN_CONSUMER_SCOPE</code> when they can produce multiple types.
If a Producer service can produce different types, it should set this
property to the array of scope names it can produce, the Consumer service
must set the array of scope names it can consume. The scope of a
<code>Wire</code> object is defined as the intersection of permitted scope
names of the Producer service and Consumer service.
<p>
If neither the Consumer, or the Producer service registers scope names
with its service registration, then the <code>Wire</code> object's scope
must be <code>null</code>.
<p>
The <code>Wire</code> object's scope must not change when a Producer or
Consumer services modifies its scope.
<p>
A scope name is permitted for a Producer service when the registering
bundle has <code>WirePermission[name,PRODUCE]</code>, and for a Consumer
service when the registering bundle has <code>WirePermission[name,CONSUME]</code>.
<p>
If either Consumer service or Producer service has not set a
<code>WIREADMIN_*_SCOPE</code> property, then the returned value must be
<code>null</code>.
<p>
If the scope is set, the <code>Wire</code> object must enforce the scope
names when <code>Envelope</code> objects are used as a parameter to update
or returned from the <code>poll</code> method. The <code>Wire</code> object
must then remove all <code>Envelope</code> objects with a scope name that
is not permitted.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>A list of permitted scope names or null if the Produce or
Consumer service has set no scope names.</DL>
</DD>
</DL>
<HR>
<A NAME="hasScope(java.lang.String)"><!-- --></A><H3>
hasScope</H3>
<PRE>
boolean <B>hasScope</B>(java.lang.String name)</PRE>
<DL>
<DD>Return true if the given name is in this <code>Wire</code> object's scope.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The scope name
<DT><B>Returns:</B><DD>true if the name is listed in the permitted scope names</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/osgi/service/wireadmin/Producer.html" title="interface in org.osgi.service.wireadmin"><B>PREV CLASS</B></A>
<A HREF="../../../../org/osgi/service/wireadmin/WireAdmin.html" title="interface in org.osgi.service.wireadmin"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/osgi/service/wireadmin/Wire.html" target="_top"><B>FRAMES</B></A>
<A HREF="Wire.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|