author | Stephen Talley <stephen.talley@oracle.com> |
Tue, 19 Jun 2012 17:37:39 -0400 | |
changeset 865 | 025928ac8888 |
parent 842 | abc3d63bd4da |
permissions | -rw-r--r-- |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
2 |
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
3 |
<!-- |
726
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
4 |
PDL HEADER START |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
5 |
|
726
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
6 |
Public Documentation License Notice |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
7 |
|
726
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
8 |
The contents of this Documentation are subject to the Public |
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
9 |
Documentation License Version 1.01 (the "License"); you may only |
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
10 |
use this Documentation if you comply with the terms of this License. |
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
11 |
A copy of the License is available at |
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
12 |
http://www.opensolaris.org/os/community/documentation/license. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
13 |
|
726
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
14 |
PDL HEADER END |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
15 |
|
814
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
16 |
Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
17 |
--> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
18 |
|
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
19 |
<section><title>Interfaces</title> |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
20 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
21 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
22 |
The primary purpose of <command>rad</command> is to consistently expose |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
23 |
the various pieces of the system for administration. Not all |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
24 |
subsystems are alike, however: each has a data and state model tuned to |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
25 |
the problems they are solving. Though there are major benefits to |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
26 |
using a common model across components when possible, uniformity comes |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
27 |
with trade-offs. The increased inefficiency and client complexity |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
28 |
— and risk of decreased developer adoption — often warrant |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
29 |
using an interface designed for problem at hand. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
30 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
31 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
32 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
33 |
An interface is a formal definition of how a client may |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
34 |
interact with a <command>rad</command> server object. An |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
35 |
interface may be shared amongst several objects, e.g. when |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
36 |
maintaining a degree of uniformity is possible and useful, or may be |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
37 |
implemented by only one. It is analogous to an interface or pure |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
38 |
abstract class in an object oriented programming language. In the case |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
39 |
of <command>rad</command>, an interface consists of a |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
40 |
name, the set of features a client may interact with, optionally a set |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
41 |
of derived types referenced by the features, and a version. The |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
42 |
features supported include methods (procedure calls made in the context |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
43 |
of a specific object), properties (which are functionally equivalent to |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
44 |
methods but bear different semantics), and asynchronous event sources. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
45 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
46 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
47 |
<section><title>Name</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
48 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
49 |
Each interface has a name. This name is used by the |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
50 |
toolchain to construct indentifier names when generating code, and |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
51 |
is returned by the server along with the rest of the |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
52 |
interface definition when an object is examined by a |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
53 |
client. There isn't a global namespace for |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
54 |
interfaces, however. A client is expected either to |
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
55 |
know which objects implement which interfaces (typical |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
56 |
consumer) or to query <command>rad</command> for the object's full |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
57 |
interface definition (debugger or interactive tools). |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
58 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
59 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
60 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
61 |
Though in the future <command>rad</command> may establish a |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
62 |
namespace for interfaces, the lack of a namespace |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
63 |
doesn't present a serious problem today. A <trademark |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
64 |
class='trade'>Unix</trademark> executable isn't going to open every |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
65 |
library in <filename class='directory'>/usr/lib</filename> until it |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
66 |
finds one that claims to offer the <quote>libc</quote> interface; |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
67 |
it is going to open <filename |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
68 |
class='libraryfile'>/usr/lib/libc.so.1</filename>. Likewise, the |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
69 |
typical client isn't going to search for objects claiming to export |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
70 |
a particular interface, it will be acting on the |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
71 |
specific object documented to have not just the desired |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
72 |
interface, but the desired behavior as well. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
73 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
74 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
75 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
76 |
<section><title>Derived Types</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
77 |
<para> |
815
8aaf27c3594e
CR7106699 rad developer guide needs to cover unions
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
814
diff
changeset
|
78 |
Three classes of derived types may be defined for use by features: |
8aaf27c3594e
CR7106699 rad developer guide needs to cover unions
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
814
diff
changeset
|
79 |
<type>structure</type>s, <type>union</type>s, and |
8aaf27c3594e
CR7106699 rad developer guide needs to cover unions
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
814
diff
changeset
|
80 |
<type>enumeration</type>s. Each type defined must be uniquely |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
81 |
named. As with interfaces, there isn't a global type |
815
8aaf27c3594e
CR7106699 rad developer guide needs to cover unions
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
814
diff
changeset
|
82 |
namespace. The types defined in an <acronym>API</acronym> are only |
8aaf27c3594e
CR7106699 rad developer guide needs to cover unions
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
814
diff
changeset
|
83 |
available to the features defined in that <acronym>API</acronym>. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
84 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
85 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
86 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
87 |
<section><title>Features</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
88 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
89 |
The only thing all three feature types — methods, attributes, |
726
e8787861c022
18516 Dev guide nits
David Powell <david.e.powell@oracle.com>
parents:
587
diff
changeset
|
90 |
and events — have in common is that they are named. All |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
91 |
three feature types' names exist in the same namespace, and must |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
92 |
therefore be unique. i.e. it is not possible to have both a method |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
93 |
and an attribute called <quote>foo</quote>. This exclusion is |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
94 |
intended as a simple mechanism to avoid the majority of conflicts |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
95 |
that could arise when trying to naturally map these interface |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
96 |
features to a client environment. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
97 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
98 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
99 |
<note> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
100 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
101 |
Enforcing a common namespace for interface features |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
102 |
isn't always enough. Some language environments place additional |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
103 |
constraints on naming. For instance, a <acronym>JMX</acronym> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
104 |
client using MXBean proxies will see an interface with |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
105 |
synthetic methods of the form <function>getXXX()</function> or |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
106 |
<function>setXXX()</function> for accessing attribute XXX that must |
767
a7b6e6d4061d
18861 Complete libadr dev guide chapter
David Powell <david.e.powell@oracle.com>
parents:
726
diff
changeset
|
107 |
coexist with other method names — explicitly defining methods |
a7b6e6d4061d
18861 Complete libadr dev guide chapter
David Powell <david.e.powell@oracle.com>
parents:
726
diff
changeset
|
108 |
with those names will cause a conflict. Unfortunately, at the |
a7b6e6d4061d
18861 Complete libadr dev guide chapter
David Powell <david.e.powell@oracle.com>
parents:
726
diff
changeset
|
109 |
moment, it is up to the developer to be aware of these issues. In |
a7b6e6d4061d
18861 Complete libadr dev guide chapter
David Powell <david.e.powell@oracle.com>
parents:
726
diff
changeset
|
110 |
the future such situations may be identified by the toolchain and a |
a7b6e6d4061d
18861 Complete libadr dev guide chapter
David Powell <david.e.powell@oracle.com>
parents:
726
diff
changeset
|
111 |
warning issued. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
112 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
113 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
114 |
One alternative would be to escape method and attribute names in |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
115 |
the <acronym>JMX</acronym> client. By prefixing every method name |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
116 |
with <quote>M</quote> and every property with <quote>P</quote>, for |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
117 |
example, overlaps between the synthetic and real methods would be |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
118 |
eliminated. Each approach has its trade-offs. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
119 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
120 |
</note> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
121 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
122 |
<section><title>Methods</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
123 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
124 |
A method is a procedure call made in the context of the object it |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
125 |
is called on. In addition to a name, a method |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
126 |
<emphasis>may</emphasis> define a return type, can define |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
127 |
<emphasis>zero or more</emphasis> arguments, and |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
128 |
<emphasis>may</emphasis> declare that it returns an error, |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
129 |
optionally with an error return type. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
130 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
131 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
132 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
133 |
If a method does not define a return type, it returns no value. It |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
134 |
is effectively of type <type>void</type>. If a method defines a |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
135 |
return type, and that type is permitted to be nullable (see |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
136 |
previous chapter), the return value may be defined to be nullable. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
137 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
138 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
139 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
140 |
Each method argument has a name and a type. If any argument's type |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
141 |
is permitted to be nullable (see previous chapter) that argument |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
142 |
may be defined to be nullable. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
143 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
144 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
145 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
146 |
If a method doesn't declare that it returns an error, it |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
147 |
theoretically cannot fail. No system is infallible, though. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
148 |
Because the connection to <command>rad</command> could be broken |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
149 |
(either due to a network problem or a catastrophic failure in |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
150 |
<command>rad</command> itself), <emphasis>all</emphasis> method |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
151 |
calls can fail with an I/O error. If a method declares that it |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
152 |
returns an error but does not specify a type, the method may fail |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
153 |
due to <acronym>API</acronym>-specific reasons. Clients will |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
154 |
distinguish this failure type from I/O failures. Finally, if a |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
155 |
method also defines an error return type, data of that type may be |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
156 |
provided to the client in the case where the |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
157 |
<acronym>API</acronym>-specific failure occurs. Error payloads are |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
158 |
implicitly optional, and must therefore be of a type that is |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
159 |
permitted to be nullable. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
160 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
161 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
162 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
163 |
Methods names may not be overloaded. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
164 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
165 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
166 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
167 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
168 |
<section><title>Attributes</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
169 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
170 |
An attribute is metaphorically a property of the object. In |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
171 |
addition to a name, each attribute has a type, is defined to be one |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
172 |
of read-only, read-write, or write-only, and (like a method) |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
173 |
<emphasis>may</emphasis> declare that accessing the attribute |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
174 |
returns an error, optionally with an error return type. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
175 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
176 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
177 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
178 |
Reading a read-only or read-write attribute returns the value of |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
179 |
that attribute. Writing a write-only or read-write attribute sets |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
180 |
the value of that attribute. It is invalid to read a write-only |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
181 |
attribute or write a read-only attribute. Clients may treat |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
182 |
attempts to write to a read-only attribute as a write to an |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
183 |
attribute that doesn't exist. Likewise, attempts to read from a |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
184 |
write-only attribute may be treated as an attempt to read from an |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
185 |
attribute that doesn't exist. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
186 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
187 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
188 |
<para> |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
189 |
If an attribute's type is permitted to be nullable, its value may |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
190 |
be defined to be nullable. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
191 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
192 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
193 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
194 |
An attribute may optionally declare that it returns an error, with |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
195 |
the same semantics as declaring (or not declaring) an error for a |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
196 |
method. Unlike a method, an attribute may have different error |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
197 |
declarations for reading the attribute and writing the attribute. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
198 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
199 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
200 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
201 |
Attribute names may not be overloaded. To be clear, it is not |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
202 |
valid to define a read-only attribute and a write-only attribute |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
203 |
with the same name. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
204 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
205 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
206 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
207 |
Given methods, attributes are arguably a superfluous |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
208 |
interface feature. Writing an attribute of type |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
209 |
<type>X</type> can be implemented with a method that takes one |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
210 |
argument of type <type>X</type> and returns nothing, and reading an |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
211 |
attribute of type <type>X</type> can be implemented with a method |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
212 |
that takes no arguments and returns a value of type |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
213 |
<type>X</type>. Attributes are included because they have slightly |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
214 |
different semantics, a fact that is recognized by many language |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
215 |
environments. In particular, an explicit attribute mechanism: |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
216 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
217 |
<itemizedlist> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
218 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
219 |
Enforces symmetric access for reading and writing read-write |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
220 |
attributes. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
221 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
222 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
223 |
Can be easily and automatically translated to a form |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
224 |
natural to the client language-environment. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
225 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
226 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
227 |
Communicates more about the nature of the interaction. Though |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
228 |
it isn't mandatory, it is recommended that reading an attribute |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
229 |
not affect system state. It is also recommended that the value |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
230 |
written to a read-write attribute be the value returned on |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
231 |
subsequent reads (unless there is an intervening change to the |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
232 |
system that effectively <quote>writes</quote> a new value). |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
233 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
234 |
</itemizedlist> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
235 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
236 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
237 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
238 |
<section><title>Events</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
239 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
240 |
An event is an asynchronous notification generated by rad and |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
241 |
consumed by clients. A client may subscribe to events by name to |
814
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
242 |
register interest in them. The subscription is performed on an |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
243 |
object which implements an interface. In addition to a name, each event |
814
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
244 |
has a type. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
245 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
246 |
<para> |
814
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
247 |
Events have the following characteristics: |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
248 |
<itemizedlist> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
249 |
<listitem><para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
250 |
Sequential. |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
251 |
</para></listitem> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
252 |
<listitem><para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
253 |
Volatile |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
254 |
</para></listitem> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
255 |
<listitem><para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
256 |
Guaranteed |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
257 |
</para></listitem> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
258 |
</itemizedlist> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
259 |
</para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
260 |
<para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
261 |
A client can rely on sequential delivery of events from a server |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
262 |
as long as the connection to the server is maintained. If the |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
263 |
connection fails, then events will be lost. On re-connection, a |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
264 |
client must re-subscribe to resume the flow of events. |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
265 |
</para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
266 |
<para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
267 |
Once a client has subscribed to an event, event notifications will |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
268 |
be received until the client unsubscribes from the event. |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
269 |
</para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
270 |
<para> |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
271 |
On receipt of a subscribed event, a client receives a payload of |
f21b7d3dd788
7154808 rad development guide should better document events
Gary Pennington <gary.pennington@oracle.com>
parents:
767
diff
changeset
|
272 |
the defined type. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
273 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
274 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
275 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
276 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
277 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
278 |
<section><title>Version</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
279 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
280 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
281 |
<acronym>API</acronym>s change over time. Sometimes a change to an |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
282 |
<acronym>API</acronym> is incompatible with existing consumers. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
283 |
Other times a change is compatible with existing consumers, but may |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
284 |
breed a new batch of consumers that are unable to use the |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
285 |
<acronym>API</acronym> that was in place before the change |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
286 |
occurred. Moreover, not all features are created equal. Some |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
287 |
represent committed interfaces whose compatibility is paramount, |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
288 |
others are private interfaces that are changed only in lockstep |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
289 |
with the software that uses them. To address all these issues, |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
290 |
<command>rad</command> interfaces are versioned. |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
291 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
292 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
293 |
<section><title>Numbering</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
294 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
295 |
Measuring the compatibility of a change is the first problem that |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
296 |
needs to be solved. <command>rad</command> uses a simple |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
297 |
<replaceable>major</replaceable>.<replaceable>minor</replaceable> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
298 |
versioning scheme. When a compatible change to an |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
299 |
interface is made, its minor version number is |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
300 |
incremented. When an incompatible change is made, its major |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
301 |
version number is incremented and its minor version number is reset |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
302 |
to 0. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
303 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
304 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
305 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
306 |
In other words, an implementation of an interface that claims to be |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
307 |
version <replaceable>X</replaceable>.<replaceable>Y</replaceable> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
308 |
(where <replaceable>X</replaceable> is the major version and |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
309 |
<replaceable>Y</replaceable> is the minor version) must support any |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
310 |
client expecting version |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
311 |
<replaceable>X</replaceable>.<replaceable>Z</replaceable>, where |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
312 |
<replaceable>Z</replaceable> <= <replaceable>Y</replaceable>. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
313 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
314 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
315 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
316 |
The following interface changes are considered |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
317 |
compatible: |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
318 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
319 |
<itemizedlist> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
320 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
321 |
Adding a new event. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
322 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
323 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
324 |
Adding a new method. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
325 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
326 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
327 |
Adding a new attribute. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
328 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
329 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
330 |
Expanding the access supported by an attribute (e.g. from |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
331 |
read-only to read-write). |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
332 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
333 |
<listitem><para> |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
334 |
A change from nullable to non-nullable for a method |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
335 |
return value or readable property (i.e. decreasing the range |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
336 |
of a feature). |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
337 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
338 |
<listitem><para> |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
339 |
A change from non-nullable to nullable for a method |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
340 |
argument or writable property (i.e. increasing the domain |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
341 |
of a feature). |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
342 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
343 |
</itemizedlist> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
344 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
345 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
346 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
347 |
The following interface changes are considered |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
348 |
incompatible: |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
349 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
350 |
<itemizedlist> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
351 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
352 |
Removing an event. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
353 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
354 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
355 |
Removing a method. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
356 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
357 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
358 |
Removing an attribute. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
359 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
360 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
361 |
Changing the type of an attribute, method, or event. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
362 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
363 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
364 |
Changing a type definition referenced by an attribute, method, |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
365 |
or event. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
366 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
367 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
368 |
Decreasing the access supported by an attribute (e.g. from |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
369 |
read-write to read-only). |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
370 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
371 |
<listitem><para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
372 |
Adding or removing method arguments. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
373 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
374 |
<listitem><para> |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
375 |
A change from non-nullable to nullable for a method |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
376 |
return value or readable property (i.e. increasing the range |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
377 |
of a feature). |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
378 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
379 |
<listitem><para> |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
380 |
A change from nullable to non-nullable for a method |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
381 |
argument or writable property (i.e. decreasing the domain |
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
382 |
of a feature). |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
383 |
</para></listitem> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
384 |
</itemizedlist> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
385 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
386 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
387 |
<note> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
388 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
389 |
An interface is more than just a set of methods, |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
390 |
attributes, and events. Associated with those features are |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
391 |
well-defined behaviors. If those behaviors change, even if the |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
392 |
structure of the interface remains the same, a change |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
393 |
to the version number may be required to honor the above |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
394 |
guarantee. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
395 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
396 |
</note> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
397 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
398 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
399 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
400 |
<section><title>Commitment</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
401 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
402 |
To solve the problem wherein different features are intended for |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
403 |
different consumers, <command>rad</command> defines three |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
404 |
commitment levels: private, uncommitted, and committed. Each |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
405 |
method, attribute, and event in an interface defines |
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
406 |
its commitment level independently. The interface is |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
407 |
assigned a separate version number, as described in the previous |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
408 |
section, per commitment level. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
409 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
410 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
411 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
412 |
Each commitment level is considered a superset of the next |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
413 |
more-committed level. e.g. <quote>private</quote> is a superset of |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
414 |
<quote>uncommitted</quote>. This means then when an uncommitted |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
415 |
(or committed) interface changes, the private version number needs |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
416 |
to be changed as well. By having separate version numbers (instead |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
417 |
of just adding more dots to the existing one), private/uncommitted |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
418 |
consumers aren't broken by compatible changes to |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
419 |
uncommitted/committed interfaces. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
420 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
421 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
422 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
423 |
When a feature changes commitment level, it is treated as if the |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
424 |
feature was removed from the old commitment level and added to the |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
425 |
new one. If a feature becomes less committed, then that implies an |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
426 |
incompatible change for every commitment level that no longer |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
427 |
includes that feature, but no change for every commitment level |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
428 |
that still includes the feature (due to the implicit nesting of |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
429 |
commitment levels). If a feature becomes more committed, then that |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
430 |
implies a compatible change for each commitment level that gained |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
431 |
the feature, and no change for each commitment level that had it |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
432 |
before. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
433 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
434 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
435 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
436 |
In the simple case of an <acronym>API</acronym>containing |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
437 |
interfaces of only a single commitment level, this reduces to |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
438 |
traditional commitment-agnostic major/minor versioning. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
439 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
440 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
441 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
442 |
<section><title>Clients and Versioning</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
443 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
444 |
<para> |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
445 |
A <command>rad</command> client can ask for interface |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
446 |
version information (if the protocol in use doesn't automatically |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
447 |
provide it). What the client does with this information is |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
448 |
entirely up to it. It can expose that information directly to |
865
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
449 |
interface consumers, or it can provide <acronym>API</acronym>s |
025928ac8888
rad dev guide changes for api<->interface rename
Stephen Talley <stephen.talley@oracle.com>
parents:
842
diff
changeset
|
450 |
that encapsulate |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
451 |
verifying that the version the client expects is the version the |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
452 |
server is providing. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
453 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
454 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
455 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
456 |
In the future, it is conceivable that changes to the |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
457 |
<command>rad</command> server would result in relaxing what |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
458 |
constitutes an incompatible change. For instance, additional |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
459 |
nullable method arguments or carefully constrained derived type |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
460 |
modifications could both be allowed without impacting consumers. |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
461 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
462 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
463 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
464 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
465 |
<!-- |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
466 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
467 |
<section><title>Example</title> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
468 |
<para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
469 |
<classsynopsis class="class"> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
470 |
<oointerface><interfacename>UserManagement</interfacename></oointerface> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
471 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
472 |
<fieldsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
473 |
<modifier>RO</modifier> |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
474 |
<modifier>nullable</modifier> |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
475 |
<type>UserData[]</type><varname>userlist</varname> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
476 |
</fieldsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
477 |
<fieldsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
478 |
<modifier>WO</modifier> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
479 |
<type>password</type><varname>root_password</varname> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
480 |
</fieldsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
481 |
<fieldsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
482 |
<modifier>RW</modifier> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
483 |
<type>string</type><varname>default_shell</varname> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
484 |
</fieldsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
485 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
486 |
<methodsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
487 |
<type>void</type> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
488 |
<methodname>createUser</methodname> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
489 |
<methodparam> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
490 |
<type>string</type><parameter>name</parameter> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
491 |
</methodparam> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
492 |
<methodparam> |
842
abc3d63bd4da
7157438 RAD: need to change name of adr password type
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents:
815
diff
changeset
|
493 |
<modifier>nullable</modifier> |
587
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
494 |
<type>string</type><parameter>dataset</parameter> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
495 |
</methodparam> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
496 |
<exceptionname>UserEx</exceptionname> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
497 |
</methodsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
498 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
499 |
<fieldsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
500 |
<modifier>Event</modifier> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
501 |
<type>string</type><varname>newusers</varname> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
502 |
</fieldsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
503 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
504 |
</classsynopsis> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
505 |
</para> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
506 |
</section> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
507 |
--> |
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
508 |
|
7093024d532b
17210 Begin a developer guide
David Powell <david.e.powell@oracle.com>
parents:
diff
changeset
|
509 |
</section> |