-
Notifications
You must be signed in to change notification settings - Fork 8
/
service.clusterinfo.html
5013 lines (4958 loc) · 624 KB
/
service.clusterinfo.html
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
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>148 Cluster Information Specification - OSGi Compendium 7</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="home" href="toc.html" title="OSGi Compendium" />
<link rel="up" href="toc.html" title="OSGi Compendium" />
<link rel="prev" href="service.transaction.control.html" title="147 Transaction Control Service Specification" />
<link rel="next" href="service.configurator.html" title="150 Configurator Specification" />
<meta name="Section-title" content="148 Cluster Information Specification" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" href="images/favicon.png" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="css/custom.css" />
<link rel="stylesheet" type="text/css" href="css/github.css" />
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin" /><script type="text/javascript" src="js/highlight.pack.js"></script><script type="text/javascript" src="js/main.js"></script></head>
<body>
<div id="fullbody">
<div id="header">
<div class="menu-top-container"></div>
<div id="shadow-block"><a class="logo" href="index.html"><img src="images/logo.svg" alt="OSGi Alliance Documentation" /><h1>OSGi Compendium Release 7</h1></a></div>
</div>
<div id="mobile-menu-icon">⋮</div>
<div id="column-two">
<div id="content">
<div id="scrollable">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<td width="20%" align="left"><a accesskey="p" href="service.transaction.control.html">Prev</a>
</td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="service.configurator.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="chapter">
<div xmlns="" class="titlepage">
<div>
<div>
<h1 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="service.clusterinfo"></a><span xmlns="" class="number">148</span> Cluster Information Specification
</h1>
</div>
<div>
<p xmlns="http://www.w3.org/1999/xhtml" class="releaseinfo"><a xmlns="" class="xref" href="service.clusterinfo.html#org.osgi.service.clusterinfo" title="148.7 org.osgi.service.clusterinfo">Version 1.0</a></p>
</div>
</div>
</div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a xmlns="" class="anchor" id="d0e130183"></a><span xmlns="" class="number">148.1</span> Introduction
</h2>
</div>
</div>
</div>
<p>Modern enterprise applications are most often deployed on
distributed infrastructure such as a private or public cloud environment,
instead of on a single server. This is done to distribute the application
load, to replicate the application to guarantee availability or to exploit
dedicated hardware for certain application functionality (for example, a
database server).
</p>
<p>The unit of management is often no longer a single physical machine.
Server infrastructure is nowadays mostly offered in a virtualized fashion,
such as hardware virtualization using a hypervisor or operating system
virtualization using containers. Potentially these can also be
hierarchically managed, for example having multiple containers running
inside a virtual machine. Therefore, it becomes key to manage an
application running on a cluster of such (virtual) machines and/or
containers.
</p>
<p>Also in the context of the Internet of Things (IoT), often a number
of gateway devices is deployed in the network that connect various sensors
and actuators creating a smart environment. Again, it becomes key to
discover and manage these devices, and query their capabilities.
</p>
<p>The OSGi specification already provides chapters describing how to
deploy software on remote infrastructure, how to call remote services or
how manage a remote OSGi framework. In this chapter we define an API for a
management agent to discover, list and inspect available nodes in the
cluster.
</p>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="d0e130194"></a><span xmlns="" class="number">148.1.1</span> Essentials
</h3>
</div>
</div>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p><span class="emphasis"><em>Cluster</em></span> - A cluster is a collection of
nodes connected by a network. Most often the nodes are managed by a
public or private cloud provider.
</p>
</li>
<li class="listitem">
<p><span class="emphasis"><em>Node</em></span> - A node is a discoverable entity in
the cluster, for example a physical machine, a virtual machine (VM),
a container or an OSGi framework.
</p>
</li>
</ul>
</div>
</div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="d0e130208"></a><span xmlns="" class="number">148.1.2</span> Entities
</h3>
</div>
</div>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p><span class="emphasis"><em>NodeStatus</em></span> - The Node Status service
represents a node in the cluster. This can be any entity in the
cluster such as a database server, a virtual machine, a container,
an OSGi framework, etc.
</p>
</li>
<li class="listitem">
<p><span class="emphasis"><em>FrameworkNodeStatus</em></span> - The Framework Node
Status service represents an OSGi framework in the cluster.
</p>
</li>
<li class="listitem">
<p><span class="emphasis"><em>FrameworkManager</em></span> - The FrameworkManager
service provides an interface to manage an OSGi framework in the
cluster.
</p>
</li>
</ul>
</div>
<div class="figure"><a xmlns="" class="anchor" id="d0e130227"></a><p class="title"><strong>Figure <span xmlns="" class="number">148</span>.1 Clusterinfo Entity overview</strong></p>
<div class="figure-contents">
<div class="mediaobject" align="center"><img src="images/148-clusterinfo-classes.png" align="middle" width="360" height="338" alt="Clusterinfo Entity overview" /></div>
</div>
</div><br class="figure-break" /></div>
</div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a xmlns="" class="anchor" id="d0e130233"></a><span xmlns="" class="number">148.2</span> OSGi frameworks in a cluster
</h2>
</div>
</div>
</div>
<p>We distinguish two types of nodes in a cluster. On the one hand we
have OSGi frameworks, which publish their presence using a Framework Node
Status service. On the other hand there can be other nodes in the cluster,
such as the virtual machines or containers the OSGi frameworks are running
on, or an external server such as a database. These can be represented
using a Node Status service.
</p>
<p>When an OSGi framework is part of a cluster, this means it gets
access to remote services of any other OSGi framework in that cluster.
Ensuring the discovery, visibility and access of remote services within
the cluster is the responsibility of the <a xmlns="" class="xref" href="service.remoteserviceadmin.html" title="122 Remote Service Admin Service Specification"><em xmlns="http://www.w3.org/1999/xhtml">Remote Service Admin Service Specification</em></a>.
</p>
<p>An example cluster deployment is shown in <a xmlns="" class="xref" href="service.clusterinfo.html#service.clusterinfo-figure.cluster.deployment" title="Figure 148.2 Example cluster deployment">Figure <span class="number">148</span>.2 on page </a>. Here, a cluster consisting of
three virtual machines or containers has deployed a total of four OSGi
frameworks. Each OSGi framework has a Cluster Information implementation
running that exposes a Framework Node Status service. Besides these, there
can also be an entity managing the virtual machines/containers (for
example, the cloud provider), that exposes three Node Status services, one
for each VM/container. In this case, each Framework Node Status will have
a parent id pointing to the id of the Node Status of the VM/container it
is deployed on.
</p>
<div class="figure"><a xmlns="" class="anchor" id="service.clusterinfo-figure.cluster.deployment"></a><p class="title"><strong>Figure <span xmlns="" class="number">148</span>.2 Example cluster deployment</strong></p>
<div class="figure-contents">
<div class="mediaobject" align="center"><img src="images/148-clusterinfo.png" align="middle" width="360" height="338" alt="Example cluster deployment" /></div>
</div>
</div><br class="figure-break" /></div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a xmlns="" class="anchor" id="d0e130252"></a><span xmlns="" class="number">148.3</span> Node Status Service
</h2>
</div>
</div>
</div>
<p>The <a xmlns="" class="xref" href="service.clusterinfo.html#org.osgi.service.clusterinfo.NodeStatus" title="148.7.5 public interface NodeStatus">NodeStatus</a> service advertises the availability of a node in
the cluster. This node can be any entity in the cluster such as a physical
machine, a virtual machine, a container or an OSGi framework.
</p>
<p>The Node Status service provides metadata about the node via its
service properties. Each Node Status must provide an id and cluster name.
Optionally additional service properties can be provided such as the
physical location of the node, the endpoints at which this node can be
accessed, etc. These service properties can be converted to a <a xmlns="" class="xref" href="service.clusterinfo.html#org.osgi.service.clusterinfo.dto.NodeStatusDTO" title="148.8.3 public class NodeStatusDTO extends DTO">NodeStatusDTO</a> to have type-safe access to these properties using
the <a xmlns="" class="xref" href="util.converter.html" title="707 Converter Specification"><em xmlns="http://www.w3.org/1999/xhtml">Converter Specification</em></a>.
</p>
<div class="table"><a xmlns="" class="anchor" id="d0e130265"></a><p class="title"><strong>Table <span xmlns="" class="number">148</span>.1 Service properties of the NodeStatus service</strong></p>
<div class="table-contents">
<table summary="Service properties of the NodeStatus service" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; ">
<colgroup>
<col />
<col />
<col />
</colgroup>
<thead>
<tr>
<th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">Service Property Name</th>
<th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">Type</th>
<th style="border-bottom: 0.5pt solid ; ">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.id</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The globally unique ID for this node. For example the
Docker ID if this node is a Docker container, or the framework
UUID if this node is an OSGi framework.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.cluster</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The name of the cluster this node belongs
to.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.parent</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>In the case this node is part of or embedded in
another node, this field contains the id of the parent node. For
example multiple virtual machines could run on the same physical
node.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.endpoint</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String+</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The endpoint(s) at which this node can be accessed
from the viewpoint of the consumer of the service.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.endpoint.private</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String+</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>Private endpoint(s) at which this node can be
accessed from within the cluster only.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.vendor</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The vendor name of the cloud/environment in which the
node operates.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.version</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The version of the cloud/environment in which the
node operates. The value follows the versioning scheme of the
cloud provider and may therefore not comply with the OSGi
versioning syntax.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.country</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>ISO 3166-1 alpha-3 location where this node is
running, if known.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.location</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>ISO 3166-2 location where this node is running, if
known. This location is more detailed than the country code as it
may contain province or territory.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.region</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>Something smaller than a country and bigger than a
location (for example, us-east-1 or other cloud-specific
location)
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">osgi.clusterinfo.zone</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>Regions are often subdivided in zones that represent
different physical locations. The zone can be provided
here.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; "><code class="code">osgi.clusterinfo.tags</code></td>
<td style="border-right: 0.5pt solid ; "><code class="code">String+</code></td>
<td style="">
<p>Tags associated with this node that can be
contributed to by the provider and also by bundles.
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div><br class="table-break" /><p>The Node Status service can also provide access to some dynamic
properties of the node. The <code class="code">getMetrics</code> method allows to query
key-value pairs, that are specific for that node. For example, for an OSGi
framework these could be CPU and memory usage, for a database node these
could be the number of database reads and writes, and for a VM these could
be metrics made accessible by the cloud provider. In this case the service
implementor can provide DTOs to have a type-safe way to access these
metrics by converting the returned map to one of these DTOs. For example,
an implementation could expose JMX metrics together with a type-safe
DTO:
</p><pre xmlns="" class="programlisting"><code>public class JMXMetricsDTO extends DTO {
/**
* The number of processors available
*/
public int availableProcessors;
/**
* The average system load
*/
public float systemLoadAverage;
/**
* The maximal amount of heap memory available to the JVM
*/
public long heapMemoryMax;
/**
* The amount of heap memory used by the JVM
*/
public long heapMemoryUsed;
/**
* The maximal amount of non-heap memory available to the JVM
*/
public long nonHeapMemoryMax;
/**
* The amount of non-heap memory used by the JVM
*/
public long nonHeapMemoryUsed;
}</code></pre><p>Such DTO can be used to obtain metrics from a
<code class="code">NodeStatus</code> service as follows:
</p><pre xmlns="" class="programlisting"><code>// From service registry
NodeStatus ns = ...;
// Obtain all metrics for this node
Map<String, Object> metrics = ns.getMetrics();
// Convert the metrics map to a DTO for type-safe access
JMXMetricsDTO dto = Converters.standardConverter().convert(metrics)
.to(JMXMetricsDTO.class);
// Use metrics
System.out.println("System Load Average: " + dto.systemLoadAverage);</code></pre></div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a xmlns="" class="anchor" id="d0e130415"></a><span xmlns="" class="number">148.4</span> Framework Node Status Service
</h2>
</div>
</div>
</div>
<p>In case the cluster node is an OSGi framework, the <a xmlns="" class="xref" href="service.clusterinfo.html#org.osgi.service.clusterinfo.FrameworkNodeStatus" title="148.7.4 public interface FrameworkNodeStatus extends NodeStatus, FrameworkManager">FrameworkNodeStatus</a> service is used to represent the node.
<code class="code">FrameworkNodeStatus</code> extends <code class="code">NodeStatus</code>, and the
node id is the OSGi framework UUID. Next to the Node Status service
properties, this service has some additional service properties describing
the OSGi and Java runtime:
</p>
<div class="table"><a xmlns="" class="anchor" id="d0e130428"></a><p class="title"><strong>Table <span xmlns="" class="number">148</span>.2 Additional service properties of the FrameworkNodeStatus
service</strong></p>
<div class="table-contents">
<table summary="Additional service properties of the FrameworkNodeStatus
 service" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; ">
<colgroup>
<col />
<col />
<col />
</colgroup>
<thead>
<tr>
<th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">Service Property Name</th>
<th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">Type</th>
<th style="border-bottom: 0.5pt solid ; ">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">org.osgi.framework.version</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The OSGi framework version.</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">org.osgi.framework.processor</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The OSGi framework processor
architecture.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">org.osgi.framework.os_name</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The OSGi framework operating system
name.
</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">java.version</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The Java version.</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">java.runtime.version</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The Java runtime version.</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">java.specification.version</code></td>
<td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; "><code class="code">String</code></td>
<td style="border-bottom: 0.5pt solid ; ">
<p>The Java specification version.</p>
</td>
</tr>
<tr>
<td style="border-right: 0.5pt solid ; "><code class="code">java.vm.version</code></td>
<td style="border-right: 0.5pt solid ; "><code class="code">String</code></td>
<td style="">
<p>The Java VM version.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div><br class="table-break" /><p>Similar to the Node Status service, the service properties of the
Framework Node Status service can be converted to a <a xmlns="" class="xref" href="service.clusterinfo.html#org.osgi.service.clusterinfo.dto.FrameworkNodeStatusDTO" title="148.8.2 public class FrameworkNodeStatusDTO extends NodeStatusDTO">FrameworkNodeStatusDTO</a> to have type-safe access to these properties using
the <a xmlns="" class="xref" href="util.converter.html" title="707 Converter Specification"><em xmlns="http://www.w3.org/1999/xhtml">Converter Specification</em></a>.
</p>
<p>The Framework Node Status service also extends the <a xmlns="" class="xref" href="service.clusterinfo.html#org.osgi.service.clusterinfo.FrameworkManager" title="148.7.3 public interface FrameworkManager">FrameworkManager</a> interface, which provides a management interface
for the OSGi framework. This allows a remote management agent to interact
with the OSGi framework. The Framework Node Status service can be exported
remotely with Remote Services, however alternative mechanisms to
distribute this service are also permitted. For example, the
FrameworkManager interface can also be made available through the <a xmlns="" class="xref" href="service.rest.html" title="137 REST Management Service Specification"><em xmlns="http://www.w3.org/1999/xhtml">REST Management Service Specification</em></a>.
</p>
<p>The following example uses the <code class="code">NodeStatus</code> properties
from a <code class="code">FrameworkNodeStatus</code> service to see what country the
framework is running in. If it is running in Germany a bundle specific for
that country is installed:
</p><pre xmlns="" class="programlisting"><code>@Component
public class FrameworkProvisioner {
private static final Converter CONVERTER = Converters.standardConverter();
@Reference(cardinality = MULTIPLE, policy = DYNAMIC)
void addFramework(FrameworkNodeStatus fns, Map<String,Object> props) {
// Convert the properties to the DTO for type safe access
NodeStatusDTO dto = CONVERTER.convert(props).to(NodeStatusDTO.class);
// Check the ISO 3166-1 alpha 3 country code
if ("DEU".equals(dto.country)) {
// If this framework runs in Germany, install a special bundle into it
try {
fns.installBundle("... Germany specific bundle ...");
} catch (Exception e) {
// log
}
}
}
}</code></pre></div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a xmlns="" class="anchor" id="d0e130536"></a><span xmlns="" class="number">148.5</span> Application-specific Node Status metadata
</h2>
</div>
</div>
</div>
<p>The Node Status service provides a
<code class="code">osgi.clusterinfo.tags</code> property. Here, application specific
tags can be assigned to the <code class="code">NodeStatus</code> services. For example,
one could assign different roles to the nodes such as "worker",
"database", "storage", "gateway", etc. These roles are
application-specific and should be defined by the application
developer.
</p>
<p>Bundles can specify additional tags to be included in the
<code class="code">FrameworkNodeStatus</code> service representing the current
framework by registering any service with the service property
<code class="code">org.osgi.service.clusterinfo.tags</code> providing a custom
<code class="code">String[]</code> of tags. The Cluster Information implementation will
add those to the tags property of the <code class="code">FrameworkNodeStatus</code>
service that represents the OSGi framework. For example:
</p><pre xmlns="" class="programlisting"><code>// Register an arbitrary service that communicates the tags
// to be added to the osgi.clusterinfo.tags service property.
Dictionary<String, Object> props = new Hashtable<>();
props.put("org.osgi.service.clusterinfo.tags",
new String [] {"database", "large_box"});
bundleContext.registerService(MyClass.class, this, props);</code></pre></div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a xmlns="" class="anchor" id="d0e130563"></a><span xmlns="" class="number">148.6</span> Security
</h2>
</div>
</div>
</div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="d0e130566"></a><span xmlns="" class="number">148.6.1</span> Cluster Tag Permission
</h3>
</div>
</div>
</div>
<p>The <code class="code">ClusterTagPermission</code> class allows fine-grained
control over which bundles may add which tags to the Framework Node
Status service. A bundle can be granted to add a certain tag to the
Framework Node Status, or be granted to add any tag using the *
wildcard.
</p>
</div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="d0e130574"></a><span xmlns="" class="number">148.6.2</span> Required Permissions
</h3>
</div>
</div>
</div>
<p>The Cluster Information Specification should only be implemented
by trusted bundles. These bundles require
<code class="code">ServicePermission[NodeStatus|FrameworkNodeStatus|FrameworkManager,
REGISTER]</code>.
</p>
<p>All bundles accessing the Cluster Information services should get
<code class="code">ServicePermission[NodeStatus|FrameworkNodeStatus|FrameworkManager,
GET]</code>.
</p>
<p>Only trusted bundles who must be able to add Node Status tags
should be assigned <code class="code">ClusterTagPermission[ClusterTag,
ADD]</code>.
</p>
</div>
<div class="section">
<div xmlns="" class="titlepage">
<div>
<div>
<h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="d0e130592"></a><span xmlns="" class="number">148.6.3</span> Remote service visibility in a cluster
</h3>
</div>
</div>
</div>
<p>By default, all remote OSGi services are visible within a cluster.
This is handled by the <a xmlns="" class="xref" href="service.remoteserviceadmin.html" title="122 Remote Service Admin Service Specification"><em xmlns="http://www.w3.org/1999/xhtml">Remote Service Admin Service Specification</em></a>.
</p>
</div>
</div>
<div class="section package">
<div xmlns="" class="titlepage">
<div>
<div>
<h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo"></a><span xmlns="" class="number">148.7</span> org.osgi.service.clusterinfo
</h2>
</div>
<div>
<p xmlns="http://www.w3.org/1999/xhtml" class="releaseinfo">Version 1.0</p>
</div>
</div>
</div>
<p>
ClusterInfo Services Package Version 1.0.
</p>
<p>
Bundles wishing to use this package must list the package in the
Import-Package header of the bundle's manifest. This package has two types of
users: the consumers that use the API in this package and the providers that
implement the API in this package.
</p>
<p>
Example import for consumers using the API in this package:
</p>
<p>
<code class="code">Import-Package: org.osgi.service.clusterinfo; version="[1.0,2.0)"</code>
</p>
<p>
Example import for providers implementing the API in this package:
</p>
<p>
<code class="code">Import-Package: org.osgi.service.clusterinfo; version="[1.0,1.1)"</code>
</p>
<div class="section summary">
<div xmlns="" class="titlepage">
<div>
<div>
<h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="d0e130625"></a><span xmlns="" class="number">148.7.1</span> Summary
</h3>
</div>
</div>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a xmlns="" class="link" href="service.clusterinfo.html#org.osgi.service.clusterinfo.ClusterTagPermission" title="148.7.2 public final class ClusterTagPermission extends Permission">
<code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code>
</a> -
A bundle's authority to add a tag to a NodeStatus service.
</p>
</li>
<li class="listitem">
<p>
<a xmlns="" class="link" href="service.clusterinfo.html#org.osgi.service.clusterinfo.FrameworkManager" title="148.7.3 public interface FrameworkManager">
<code xmlns="http://www.w3.org/1999/xhtml" class="code">FrameworkManager</code>
</a> -
Provides a management interface for accessing and managing a remote OSGi
framework.
</p>
</li>
<li class="listitem">
<p>
<a xmlns="" class="link" href="service.clusterinfo.html#org.osgi.service.clusterinfo.FrameworkNodeStatus" title="148.7.4 public interface FrameworkNodeStatus extends NodeStatus, FrameworkManager">
<code xmlns="http://www.w3.org/1999/xhtml" class="code">FrameworkNodeStatus</code>
</a> -
The FrameworkNodeStatus service represents a node in the cluster that is also
an OSGi framework.
</p>
</li>
<li class="listitem">
<p>
<a xmlns="" class="link" href="service.clusterinfo.html#org.osgi.service.clusterinfo.NodeStatus" title="148.7.5 public interface NodeStatus">
<code xmlns="http://www.w3.org/1999/xhtml" class="code">NodeStatus</code>
</a> -
The NodeStatus service represents a node in the cluster.
</p>
</li>
</ul>
</div>
</div>
<div class="section class">
<div xmlns="" class="titlepage">
<div>
<div>
<h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.ClusterTagPermission"></a><span xmlns="" class="number">148.7.2</span> public final class ClusterTagPermission<br xmlns="" /> extends Permission
</h3>
</div>
</div>
</div>
<p>
A bundle's authority to add a tag to a NodeStatus service.
</p>
<div class="section field">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.ClusterTagPermission.ADD"></a><span xmlns="" class="number">148.7.2.1</span> public static final String ADD = "add"
</h4>
</div>
</div>
</div>
<p>
The action string <code class="code">add</code>.
</p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.ClusterTagPermission.ClusterTagPermission-String-String-"></a><span xmlns="" class="number">148.7.2.2</span> public ClusterTagPermission(String tag, String actions)
</h4>
</div>
</div>
</div>
<p xmlns="" class="parameter"><label>tag</label><span>Give permission to add this tag, use * wildcard to give
permission to add any tag.</span></p>
<p xmlns="" class="parameter"><label>actions</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">add</code>.</span></p>
<p xmlns="" class="description"><label>□</label><span>
Defines the authority to add a tag to the NodeStatus service.
</span></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.ClusterTagPermission.equals-Object-"></a><span xmlns="" class="number">148.7.2.3</span> public boolean equals(Object obj)
</h4>
</div>
</div>
</div>
<p xmlns="" class="parameter"><label>obj</label><span>The object to test for equality with this
<code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> object.</span></p>
<p xmlns="" class="description"><label>□</label><span>
Determines the equality of two <code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> objects. This
method checks that specified <code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> has the same
tag as this <code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> object.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">true</code> if <code xmlns="http://www.w3.org/1999/xhtml" class="code">obj</code> is a <code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code>,
and has the same tag as this <code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> object;
<code xmlns="http://www.w3.org/1999/xhtml" class="code">false</code> otherwise.</span></p>
<p></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.ClusterTagPermission.getActions--"></a><span xmlns="" class="number">148.7.2.4</span> public String getActions()
</h4>
</div>
</div>
</div>
<p xmlns="" class="description"><label>□</label><span>
Returns the canonical string representation of the
<code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> action.
</span></p>
<p>
Always returns the ADD action.
</p>
<p xmlns="" class="parameter"><label>Returns</label><span>Canonical string representation of the
<code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> actions.</span></p>
<p></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.ClusterTagPermission.hashCode--"></a><span xmlns="" class="number">148.7.2.5</span> public int hashCode()
</h4>
</div>
</div>
</div>
<p xmlns="" class="description"><label>□</label><span>
Returns the hash code value for this object.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>A hash code value for this object.</span></p>
<p></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.ClusterTagPermission.implies-Permission-"></a><span xmlns="" class="number">148.7.2.6</span> public boolean implies(Permission p)
</h4>
</div>
</div>
</div>
<p xmlns="" class="parameter"><label>p</label><span>The target permission to interrogate.</span></p>
<p xmlns="" class="description"><label>□</label><span>
Determines if the specified permission is implied by this object.
</span></p>
<p>
This method checks that the tag of the target is implied by the tag name
of this object.
</p>
<p xmlns="" class="parameter"><label>Returns</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">true</code> if the specified <code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> action
is implied by this object; <code xmlns="http://www.w3.org/1999/xhtml" class="code">false</code> otherwise.</span></p>
<p></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.ClusterTagPermission.newPermissionCollection--"></a><span xmlns="" class="number">148.7.2.7</span> public PermissionCollection newPermissionCollection()
</h4>
</div>
</div>
</div>
<p xmlns="" class="description"><label>□</label><span>
Returns a new <code xmlns="http://www.w3.org/1999/xhtml" class="code">PermissionCollection</code> object suitable for storing
<code xmlns="http://www.w3.org/1999/xhtml" class="code">ClusterTagPermission</code> objects.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>A new <code xmlns="http://www.w3.org/1999/xhtml" class="code">PermissionCollection</code> object.</span></p>
<p></p>
</div>
</div>
<div class="section class">
<div xmlns="" class="titlepage">
<div>
<div>
<h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager"></a><span xmlns="" class="number">148.7.3</span> public interface FrameworkManager
</h3>
</div>
</div>
</div>
<p>
Provides a management interface for accessing and managing a remote OSGi
framework. This interface can be accessed remotely via Remote Services.
</p>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager.getBundle-long-"></a><span xmlns="" class="number">148.7.3.1</span> public BundleDTO getBundle(long id) throws Exception
</h4>
</div>
</div>
</div>
<p xmlns="" class="parameter"><label>id</label><span>Addresses the bundle by its identifier.</span></p>
<p xmlns="" class="description"><label>□</label><span>
Retrieve the bundle representation for a given bundle Id.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>A BundleDTO for the requested bundle.</span></p>
<p xmlns="" class="parameter"><label>Throws</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">Exception</code>– An exception representing a failure in the underlying
remote call.</span></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager.getBundleHeaders-long-"></a><span xmlns="" class="number">148.7.3.2</span> public Map<String, String> getBundleHeaders(long id) throws Exception
</h4>
</div>
</div>
</div>
<p xmlns="" class="parameter"><label>id</label><span>Addresses the bundle by its identifier.</span></p>
<p xmlns="" class="description"><label>□</label><span>
Get the header for a bundle given by its bundle Id.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>Returns the map of headers entries.</span></p>
<p xmlns="" class="parameter"><label>Throws</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">Exception</code>– An exception representing a failure in the underlying
remote call.</span></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager.getBundles--"></a><span xmlns="" class="number">148.7.3.3</span> public Collection<BundleDTO> getBundles() throws Exception
</h4>
</div>
</div>
</div>
<p xmlns="" class="description"><label>□</label><span>
Get the bundle representations for all bundles currently installed in the
managed framework.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>Returns a collection of BundleDTO objects.</span></p>
<p xmlns="" class="parameter"><label>Throws</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">Exception</code>– An exception representing a failure in the underlying
remote call.</span></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager.getBundleStartLevel-long-"></a><span xmlns="" class="number">148.7.3.4</span> public BundleStartLevelDTO getBundleStartLevel(long id) throws Exception
</h4>
</div>
</div>
</div>
<p xmlns="" class="parameter"><label>id</label><span>Addresses the bundle by its identifier.</span></p>
<p xmlns="" class="description"><label>□</label><span>
Get the start level for a bundle given by its bundle Id.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>Returns a BundleStartLevelDTO describing the current
start level of the bundle.</span></p>
<p xmlns="" class="parameter"><label>Throws</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">Exception</code>– An exception representing a failure in the underlying
remote call.</span></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager.getBundleState-long-"></a><span xmlns="" class="number">148.7.3.5</span> public int getBundleState(long id) throws Exception
</h4>
</div>
</div>
</div>
<p xmlns="" class="parameter"><label>id</label><span>Addresses the bundle by its identifier.</span></p>
<p xmlns="" class="description"><label>□</label><span>
Get the state for a given bundle Id.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>Returns the current bundle state as defined in
org.osgi.framework.Bundle.</span></p>
<p xmlns="" class="parameter"><label>Throws</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">Exception</code>– An exception representing a failure in the underlying
remote call.</span></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager.getFrameworkStartLevel--"></a><span xmlns="" class="number">148.7.3.6</span> public FrameworkStartLevelDTO getFrameworkStartLevel() throws Exception
</h4>
</div>
</div>
</div>
<p xmlns="" class="description"><label>□</label><span>
Retrieves the current framework start level.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>Returns the current framework start level in the form of a
FrameworkStartLevelDTO.</span></p>
<p xmlns="" class="parameter"><label>Throws</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">Exception</code>– An exception representing a failure in the underlying
remote call.</span></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager.getServiceReference-long-"></a><span xmlns="" class="number">148.7.3.7</span> public ServiceReferenceDTO getServiceReference(long id) throws Exception
</h4>
</div>
</div>
</div>
<p xmlns="" class="parameter"><label>id</label><span>Addresses the service by its identifier.</span></p>
<p xmlns="" class="description"><label>□</label><span>
Get the service representation for a service given by its service Id.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>The service representation as ServiceReferenceDTO.</span></p>
<p xmlns="" class="parameter"><label>Throws</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">Exception</code>– An exception representing a failure in the underlying
remote call.</span></p>
</div>
<div class="section method">
<div xmlns="" class="titlepage">
<div>
<div>
<h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="" class="anchor" id="org.osgi.service.clusterinfo.FrameworkManager.getServiceReferences--"></a><span xmlns="" class="number">148.7.3.8</span> public Collection<ServiceReferenceDTO> getServiceReferences() throws Exception
</h4>
</div>
</div>
</div>
<p xmlns="" class="description"><label>□</label><span>
Get the service representations for all services.
</span></p>
<p xmlns="" class="parameter"><label>Returns</label><span>Returns the service representations in the form of
ServiceReferenceDTO objects.</span></p>
<p xmlns="" class="parameter"><label>Throws</label><span>
<code xmlns="http://www.w3.org/1999/xhtml" class="code">Exception</code>– An exception representing a failure in the underlying
remote call.</span></p>