/usr/share/doc/libosgi-compendium-java/api/org/osgi/service/monitor/MonitorAdmin.html is in libosgi-compendium-java-doc 5.0.0-3.
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 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>MonitorAdmin</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MonitorAdmin";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/osgi/service/monitor/Monitorable.html" title="interface in org.osgi.service.monitor"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/osgi/service/monitor/MonitoringJob.html" title="interface in org.osgi.service.monitor"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/osgi/service/monitor/MonitorAdmin.html" target="_top">Frames</a></li>
<li><a href="MonitorAdmin.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.osgi.service.monitor</div>
<h2 title="Interface MonitorAdmin" class="title">Interface MonitorAdmin</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="strong">MonitorAdmin</span></pre>
<div class="block">The <code>MonitorAdmin</code> service is a singleton service that handles
<code>StatusVariable</code> query requests and measurement job control requests.
<p>
Note that an alternative but not recommended way of obtaining
<code>StatusVariable</code>s is that applications having the required
<code>ServicePermissions</code> can query the list of <code>Monitorable</code> services
from the service registry and then query the list of <code>StatusVariable</code>
names from the <code>Monitorable</code> services. This way all services which
publish <code>StatusVariable</code>s will be returned regardless of whether they
do or do not hold the necessary <code>MonitorPermission</code> for publishing
<code>StatusVariable</code>s. By using the <code>MonitorAdmin</code> to obtain the
<code>StatusVariable</code>s it is guaranteed that only those <code>Monitorable</code>
services will be accessed who are authorized to publish
<code>StatusVariable</code>s. It is the responsibility of the <code>MonitorAdmin</code>
implementation to check the required permissions and show only those
variables which pass this check.
<p>
The events posted by <code>MonitorAdmin</code> contain the following properties:
<ul>
<li><code>mon.monitorable.pid</code>: The identifier of the <code>Monitorable</code></li>
<li><code>mon.statusvariable.name</code>: The identifier of the
<code>StatusVariable</code> within the given <code>Monitorable</code></li>
<li><code>mon.statusvariable.value</code>: The value of the <code>StatusVariable</code>
, represented as a <code>String</code></li>
<li><code>mon.listener.id</code>: The identifier of the initiator of the
monitoring job (only present if the event was generated due to a monitoring
job)</li>
</ul>
<p>
Most of the methods require either a Monitorable ID or a Status Variable path
parameter, the latter in [Monitorable_ID]/[StatusVariable_ID] format. These
parameters must not be <code>null</code>, and the IDs they contain must conform to
their respective definitions in <a href="../../../../org/osgi/service/monitor/Monitorable.html" title="interface in org.osgi.service.monitor"><code>Monitorable</code></a> and
<a href="../../../../org/osgi/service/monitor/StatusVariable.html" title="class in org.osgi.service.monitor"><code>StatusVariable</code></a>. If any of the restrictions are violated, the method
must throw an <code>IllegalArgumentException</code>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#getDescription(java.lang.String)">getDescription</a></strong>(java.lang.String path)</code>
<div class="block">Returns a human readable description of the given <code>StatusVariable</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#getMonitorableNames()">getMonitorableNames</a></strong>()</code>
<div class="block">Returns the names of the <code>Monitorable</code> services that are currently
registered.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/monitor/MonitoringJob.html" title="interface in org.osgi.service.monitor">MonitoringJob</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#getRunningJobs()">getRunningJobs</a></strong>()</code>
<div class="block">Returns the list of currently running <code>MonitoringJob</code>s.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/monitor/StatusVariable.html" title="class in org.osgi.service.monitor">StatusVariable</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#getStatusVariable(java.lang.String)">getStatusVariable</a></strong>(java.lang.String path)</code>
<div class="block">Returns a <code>StatusVariable</code> addressed by its full path.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#getStatusVariableNames(java.lang.String)">getStatusVariableNames</a></strong>(java.lang.String monitorableId)</code>
<div class="block">Returns the list of <code>StatusVariable</code> names published by a
<code>Monitorable</code> instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/monitor/StatusVariable.html" title="class in org.osgi.service.monitor">StatusVariable</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#getStatusVariables(java.lang.String)">getStatusVariables</a></strong>(java.lang.String monitorableId)</code>
<div class="block">Returns the <code>StatusVariable</code> objects published by a
<code>Monitorable</code> instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#resetStatusVariable(java.lang.String)">resetStatusVariable</a></strong>(java.lang.String path)</code>
<div class="block">Issues a request to reset a given <code>StatusVariable</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/monitor/MonitoringJob.html" title="interface in org.osgi.service.monitor">MonitoringJob</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#startJob(java.lang.String,%20java.lang.String[],%20int)">startJob</a></strong>(java.lang.String initiator,
java.lang.String[] statusVariables,
int count)</code>
<div class="block">Starts a change based <code>MonitoringJob</code> with the parameters provided.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/monitor/MonitoringJob.html" title="interface in org.osgi.service.monitor">MonitoringJob</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#startScheduledJob(java.lang.String,%20java.lang.String[],%20int,%20int)">startScheduledJob</a></strong>(java.lang.String initiator,
java.lang.String[] statusVariables,
int schedule,
int count)</code>
<div class="block">Starts a time based <code>MonitoringJob</code> with the parameters provided.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/monitor/MonitorAdmin.html#switchEvents(java.lang.String,%20boolean)">switchEvents</a></strong>(java.lang.String path,
boolean on)</code>
<div class="block">Switches event sending on or off for the specified <code>StatusVariable</code>
s.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getStatusVariable(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatusVariable</h4>
<pre><a href="../../../../org/osgi/service/monitor/StatusVariable.html" title="class in org.osgi.service.monitor">StatusVariable</a> getStatusVariable(java.lang.String path)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException</pre>
<div class="block">Returns a <code>StatusVariable</code> addressed by its full path. The entity
which queries a <code>StatusVariable</code> needs to hold
<code>MonitorPermission</code> for the given target with the <code>read</code>
action present.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - the full path of the <code>StatusVariable</code> in
[Monitorable_ID]/[StatusVariable_ID] format</dd>
<dt><span class="strong">Returns:</span></dt><dd>the <code>StatusVariable</code> object</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>path</code> is
<code>null</code> or otherwise invalid, or points to a non-existing
<code>StatusVariable</code></dd>
<dd><code>java.lang.SecurityException</code> - if the caller does not hold a
<code>MonitorPermission</code> for the <code>StatusVariable</code>
specified by <code>path</code> with the <code>read</code> action present</dd></dl>
</li>
</ul>
<a name="getMonitorableNames()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMonitorableNames</h4>
<pre>java.lang.String[] getMonitorableNames()</pre>
<div class="block">Returns the names of the <code>Monitorable</code> services that are currently
registered. The <code>Monitorable</code> instances are not accessible through
the <code>MonitorAdmin</code>, so that requests to individual status variables
can be filtered with respect to the publishing rights of the
<code>Monitorable</code> and the reading rights of the caller.
<p>
The returned array contains the names in alphabetical order. It cannot be
<code>null</code>, an empty array is returned if no <code>Monitorable</code>
services are registered.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the array of <code>Monitorable</code> names</dd></dl>
</li>
</ul>
<a name="getStatusVariables(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatusVariables</h4>
<pre><a href="../../../../org/osgi/service/monitor/StatusVariable.html" title="class in org.osgi.service.monitor">StatusVariable</a>[] getStatusVariables(java.lang.String monitorableId)
throws java.lang.IllegalArgumentException</pre>
<div class="block">Returns the <code>StatusVariable</code> objects published by a
<code>Monitorable</code> instance. The <code>StatusVariables</code> will hold the
values taken at the time of this method call. Only those status variables
are returned where the following two conditions are met:
<ul>
<li>the specified <code>Monitorable</code> holds a <code>MonitorPermission</code>
for the status variable with the <code>publish</code> action present</li>
<li>the caller holds a <code>MonitorPermission</code> for the status variable
with the <code>read</code> action present</li>
</ul>
All other status variables are silently ignored, they are omitted from
the result.
<p>
The elements in the returned array are in no particular order. The return
value cannot be <code>null</code>, an empty array is returned if no
(authorized and readable) Status Variables are provided by the given
<code>Monitorable</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>monitorableId</code> - the identifier of a <code>Monitorable</code> instance</dd>
<dt><span class="strong">Returns:</span></dt><dd>a list of <code>StatusVariable</code> objects published by the
specified <code>Monitorable</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>monitorableId</code> is
<code>null</code> or otherwise invalid, or points to a non-existing
<code>Monitorable</code></dd></dl>
</li>
</ul>
<a name="getStatusVariableNames(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatusVariableNames</h4>
<pre>java.lang.String[] getStatusVariableNames(java.lang.String monitorableId)
throws java.lang.IllegalArgumentException</pre>
<div class="block">Returns the list of <code>StatusVariable</code> names published by a
<code>Monitorable</code> instance. Only those status variables are listed
where the following two conditions are met:
<ul>
<li>the specified <code>Monitorable</code> holds a <code>MonitorPermission</code>
for the status variable with the <code>publish</code> action present</li>
<li>the caller holds a <code>MonitorPermission</code> for the status variable
with the <code>read</code> action present</li>
</ul>
All other status variables are silently ignored, their names are omitted
from the list.
<p>
The returned array does not contain duplicates, and the elements are in
alphabetical order. It cannot be <code>null</code>, an empty array is returned
if no (authorized and readable) Status Variables are provided by the
given <code>Monitorable</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>monitorableId</code> - the identifier of a <code>Monitorable</code> instance</dd>
<dt><span class="strong">Returns:</span></dt><dd>a list of <code>StatusVariable</code> objects names published by the
specified <code>Monitorable</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>monitorableId</code> is
<code>null</code> or otherwise invalid, or points to a non-existing
<code>Monitorable</code></dd></dl>
</li>
</ul>
<a name="switchEvents(java.lang.String, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>switchEvents</h4>
<pre>void switchEvents(java.lang.String path,
boolean on)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException</pre>
<div class="block">Switches event sending on or off for the specified <code>StatusVariable</code>
s. When the <code>MonitorAdmin</code> is notified about a
<code>StatusVariable</code> being updated it sends an event unless this
feature is switched off. Note that events within a monitoring job can not
be switched off. The event sending state of the <code>StatusVariables</code>
must not be persistently stored. When a <code>StatusVariable</code> is
registered for the first time in a framework session, its event sending
state is set to ON by default.
<p>
Usage of the "*" wildcard is allowed in the path argument of this method
as a convenience feature. The wildcard can be used in either or both path
fragments, but only at the end of the fragments. The semantics of the
wildcard is that it stands for any matching <code>StatusVariable</code> at the
time of the method call, it does not affect the event sending status of
<code>StatusVariable</code>s which are not yet registered. As an example, when
the <code>switchEvents("MyMonitorable/*", false)</code> method is executed,
event sending from all <code>StatusVariables</code> of the MyMonitorable
service are switched off. However, if the MyMonitorable service starts to
publish a new <code>StatusVariable</code> later, it's event sending status is
on by default.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - the identifier of the <code>StatusVariable</code>(s) in
[Monitorable_id]/[StatusVariable_id] format, possibly with the "*"
wildcard at the end of either path fragment</dd><dd><code>on</code> - <code>false</code> if event sending should be switched off,
<code>true</code> if it should be switched on for the given path</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code> - if the caller does not hold
<code>MonitorPermission</code> with the <code>switchevents</code> action or
if there is any <code>StatusVariable</code> in the <code>path</code> field
for which it is not allowed to switch event sending on or off as
per the target field of the permission</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>path</code> is
<code>null</code> or otherwise invalid, or points to a non-existing
<code>StatusVariable</code></dd></dl>
</li>
</ul>
<a name="resetStatusVariable(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetStatusVariable</h4>
<pre>boolean resetStatusVariable(java.lang.String path)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException</pre>
<div class="block">Issues a request to reset a given <code>StatusVariable</code>. Depending on
the semantics of the <code>StatusVariable</code> this call may or may not
succeed: it makes sense to reset a counter to its starting value, but
e.g. a <code>StatusVariable</code> of type String might not have a meaningful
default value. Note that for numeric <code>StatusVariable</code>s the starting
value may not necessarily be 0. Resetting a <code>StatusVariable</code>
triggers a monitor event if the <code>StatusVariable</code> supports update
notifications.
<p>
The entity that wants to reset the <code>StatusVariable</code> needs to hold
<code>MonitorPermission</code> with the <code>reset</code> action present. The
target field of the permission must match the <code>StatusVariable</code> name
to be reset.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - the identifier of the <code>StatusVariable</code> in
[Monitorable_id]/[StatusVariable_id] format</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the <code>Monitorable</code> could successfully reset
the given <code>StatusVariable</code>, <code>false</code> otherwise</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>path</code> is
<code>null</code> or otherwise invalid, or points to a non-existing
<code>StatusVariable</code></dd>
<dd><code>java.lang.SecurityException</code> - if the caller does not hold
<code>MonitorPermission</code> with the <code>reset</code> action or if the
specified <code>StatusVariable</code> is not allowed to be reset as
per the target field of the permission</dd></dl>
</li>
</ul>
<a name="getDescription(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDescription</h4>
<pre>java.lang.String getDescription(java.lang.String path)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException</pre>
<div class="block">Returns a human readable description of the given <code>StatusVariable</code>.
The <code>null</code> value may be returned if there is no description for the
given <code>StatusVariable</code>.
<p>
The entity that queries a <code>StatusVariable</code> needs to hold
<code>MonitorPermission</code> for the given target with the <code>read</code>
action present.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - the full path of the <code>StatusVariable</code> in
[Monitorable_ID]/[StatusVariable_ID] format</dd>
<dt><span class="strong">Returns:</span></dt><dd>the human readable description of this <code>StatusVariable</code> or
<code>null</code> if it is not set</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>path</code> is
<code>null</code> or otherwise invalid, or points to a non-existing
<code>StatusVariable</code></dd>
<dd><code>java.lang.SecurityException</code> - if the caller does not hold a
<code>MonitorPermission</code> for the <code>StatusVariable</code>
specified by <code>path</code> with the <code>read</code> action present</dd></dl>
</li>
</ul>
<a name="startScheduledJob(java.lang.String, java.lang.String[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startScheduledJob</h4>
<pre><a href="../../../../org/osgi/service/monitor/MonitoringJob.html" title="interface in org.osgi.service.monitor">MonitoringJob</a> startScheduledJob(java.lang.String initiator,
java.lang.String[] statusVariables,
int schedule,
int count)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException</pre>
<div class="block">Starts a time based <code>MonitoringJob</code> with the parameters provided.
Monitoring events will be sent according to the specified schedule. All
specified <code>StatusVariable</code>s must exist when the job is started. The
initiator string is used in the <code>mon.listener.id</code> field of all
events triggered by the job, to allow filtering the events based on the
initiator.
<p>
The <code>schedule</code> parameter specifies the time in seconds between two
measurements, it must be greater than 0. The first measurement will be
taken when the timer expires for the first time, not when this method is
called.
<p>
The <code>count</code> parameter defines the number of measurements to be
taken, and must either be a positive integer, or 0 if the measurement is
to run until explicitly stopped.
<p>
The entity which initiates a <code>MonitoringJob</code> needs to hold
<code>MonitorPermission</code> for all the specified target
<code>StatusVariable</code>s with the <code>startjob</code> action present. If the
permission's action string specifies a minimal sampling interval then the
<code>schedule</code> parameter should be at least as great as the value in
the action string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initiator</code> - the identifier of the entity that initiated the job</dd><dd><code>statusVariables</code> - the list of <code>StatusVariable</code>s to be
monitored, with each <code>StatusVariable</code> name given in
[Monitorable_PID]/[StatusVariable_ID] format</dd><dd><code>schedule</code> - the time in seconds between two measurements</dd><dd><code>count</code> - the number of measurements to be taken, or 0 for the
measurement to run until explicitly stopped</dd>
<dt><span class="strong">Returns:</span></dt><dd>the successfully started job object, cannot be <code>null</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the list of
<code>StatusVariable</code> names contains an invalid or non-existing
<code>StatusVariable</code>; if <code>initiator</code> is <code>null</code> or
empty; or if the <code>schedule</code> or <code>count</code> parameters are
invalid</dd>
<dd><code>java.lang.SecurityException</code> - if the caller does not hold
<code>MonitorPermission</code> for all the specified
<code>StatusVariable</code>s, with the <code>startjob</code> action
present, or if the permission does not allow starting the job
with the given frequency</dd></dl>
</li>
</ul>
<a name="startJob(java.lang.String, java.lang.String[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startJob</h4>
<pre><a href="../../../../org/osgi/service/monitor/MonitoringJob.html" title="interface in org.osgi.service.monitor">MonitoringJob</a> startJob(java.lang.String initiator,
java.lang.String[] statusVariables,
int count)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException</pre>
<div class="block">Starts a change based <code>MonitoringJob</code> with the parameters provided.
Monitoring events will be sent when the <code>StatusVariable</code>s of this
job are updated. All specified <code>StatusVariable</code>s must exist when
the job is started, and all must support update notifications. The
initiator string is used in the <code>mon.listener.id</code> field of all
events triggered by the job, to allow filtering the events based on the
initiator.
<p>
The <code>count</code> parameter specifies the number of changes that must
happen to a <code>StatusVariable</code> before a new notification is sent,
this must be a positive integer.
<p>
The entity which initiates a <code>MonitoringJob</code> needs to hold
<code>MonitorPermission</code> for all the specified target
<code>StatusVariable</code>s with the <code>startjob</code> action present.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initiator</code> - the identifier of the entity that initiated the job</dd><dd><code>statusVariables</code> - the list of <code>StatusVariable</code>s to be
monitored, with each <code>StatusVariable</code> name given in
[Monitorable_PID]/[StatusVariable_ID] format</dd><dd><code>count</code> - the number of changes that must happen to a
<code>StatusVariable</code> before a new notification is sent</dd>
<dt><span class="strong">Returns:</span></dt><dd>the successfully started job object, cannot be <code>null</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the list of
<code>StatusVariable</code> names contains an invalid or non-existing
<code>StatusVariable</code>, or one that does not support
notifications; if the <code>initiator</code> is <code>null</code> or empty;
or if <code>count</code> is invalid</dd>
<dd><code>java.lang.SecurityException</code> - if the caller does not hold
<code>MonitorPermission</code> for all the specified
<code>StatusVariable</code>s, with the <code>startjob</code> action present</dd></dl>
</li>
</ul>
<a name="getRunningJobs()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getRunningJobs</h4>
<pre><a href="../../../../org/osgi/service/monitor/MonitoringJob.html" title="interface in org.osgi.service.monitor">MonitoringJob</a>[] getRunningJobs()</pre>
<div class="block">Returns the list of currently running <code>MonitoringJob</code>s. Jobs are
only visible to callers that have the necessary permissions: to receive a
Monitoring Job in the returned list, the caller must hold all permissions
required for starting the job. This means that if the caller does not
have <code>MonitorPermission</code> with the proper <code>startjob</code> action
for all the Status Variables monitored by a job, then that job will be
silently omitted from the results.
<p>
The returned array cannot be <code>null</code>, an empty array is returned if
there are no running jobs visible to the caller at the time of the call.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the list of running jobs visible to the caller</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/osgi/service/monitor/Monitorable.html" title="interface in org.osgi.service.monitor"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/osgi/service/monitor/MonitoringJob.html" title="interface in org.osgi.service.monitor"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/osgi/service/monitor/MonitorAdmin.html" target="_top">Frames</a></li>
<li><a href="MonitorAdmin.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|