32 </head> |
32 </head> |
33 <body bgcolor="white"> |
33 <body bgcolor="white"> |
34 Provides classes and interfaces for making the server side of your applications |
34 Provides classes and interfaces for making the server side of your applications |
35 portable across multivendor ORBs. |
35 portable across multivendor ORBs. |
36 |
36 |
37 <P>In Java, Portable Object Adaptor (POA)-based Dynamic Skeleton Interface (DSI) |
37 <P>In Java, Portable Object Adaptor (POA)-based Dynamic Skeleton Interface (DSI) |
38 servants inherit from the standard <TT>DynamicImplementation</TT> class, which |
38 servants inherit from the standard <code>DynamicImplementation</code> class, which |
39 inherits from the <TT>Servant</TT> class. The native <TT>Servant</TT> type is |
39 inherits from the <code>Servant</code> class. The native <code>Servant</code> type is |
40 defined by the <TT>PortableServer</TT> module for the POA. In Java, the |
40 defined by the <code>PortableServer</code> module for the POA. In Java, the |
41 <TT>Servant</TT> type is mapped to the Java |
41 <code>Servant</code> type is mapped to the Java |
42 <TT>org.omg.PortableServer.Servant</TT> class. |
42 <code>org.omg.PortableServer.Servant</code> class. |
43 It serves as the base class for all POA servant |
43 It serves as the base class for all POA servant |
44 implementations and provides a number of methods that may |
44 implementations and provides a number of methods that may |
45 be invoked by the application programmer, as well as methods |
45 be invoked by the application programmer, as well as methods |
46 which are invoked by the POA itself and may be overridden by |
46 which are invoked by the POA itself and may be overridden by |
47 the user to control aspects of servant behavior. |
47 the user to control aspects of servant behavior. |
48 |
48 |
49 <H2>Package Specification</H2> |
49 <H2>Package Specification</H2> |
50 |
50 |
51 <P>For a precise list of supported sections of official OMG specifications with which |
51 <P>For a precise list of supported sections of official OMG specifications with which |
52 the Java[tm] Platform, Standard Edition 6 complies, see <A |
52 the Java[tm] Platform, Standard Edition 6 complies, see <A |
53 HREF="../CORBA/doc-files/compliance.html">Official Specifications for CORBA |
53 HREF="../CORBA/doc-files/compliance.html">Official Specifications for CORBA |
54 support in Java[tm] SE 6</A>. |
54 support in Java[tm] SE 6</A>. |
55 |
55 |
56 <H2>POA-related Interfaces</H2> |
56 <H2>POA-related Interfaces</H2> |
57 |
57 |
58 <P>The <TT>PortableServer</TT> module defines the following POA-related interfaces: |
58 <P>The <code>PortableServer</code> module defines the following POA-related interfaces: |
59 <UL> |
59 <UL> |
60 <LI><TT>POA</TT> |
60 <LI><code>POA</code> |
61 <LI><TT>POAManager</TT> |
61 <LI><code>POAManager</code> |
62 <LI><TT>ServantManager</TT> |
62 <LI><code>ServantManager</code> |
63 <LI><TT>ServantActivator</TT> |
63 <LI><code>ServantActivator</code> |
64 <LI><TT>ServantLocator</TT> |
64 <LI><code>ServantLocator</code> |
65 <LI><TT>AdapterActivator</TT> |
65 <LI><code>AdapterActivator</code> |
66 <LI><TT>ThreadPolicy</TT> |
66 <LI><code>ThreadPolicy</code> |
67 <LI><TT>LifespanPolicy</TT> |
67 <LI><code>LifespanPolicy</code> |
68 <LI><TT>IdUniquenessPolicy</TT> |
68 <LI><code>IdUniquenessPolicy</code> |
69 <LI><TT>IdAssignmentPolicy</TT> |
69 <LI><code>IdAssignmentPolicy</code> |
70 <LI><TT>ImplicitActivationPolicy</TT> |
70 <LI><code>ImplicitActivationPolicy</code> |
71 <LI><TT>ServantRetentionPolicy</TT> |
71 <LI><code>ServantRetentionPolicy</code> |
72 <LI><TT>RequestProcessingPolicy</TT> |
72 <LI><code>RequestProcessingPolicy</code> |
73 <LI><TT>Current</TT> |
73 <LI><code>Current</code> |
74 </UL> |
74 </UL> |
75 |
75 |
76 <P>In addition, the POA defines the <TT>Servant</TT> native type. |
76 <P>In addition, the POA defines the <code>Servant</code> native type. |
77 |
77 |
78 <H3>Operations classes</H3> |
78 <H3>Operations classes</H3> |
79 |
79 |
80 <P>Each of the interfaces listed above has an associated <code>Operations</code> interface. |
80 <P>Each of the interfaces listed above has an associated <code>Operations</code> interface. |
81 The <code>Operations</code> interface is generated by the <code>idlj</code> compiler and |
81 The <code>Operations</code> interface is generated by the <code>idlj</code> compiler and |
85 |
85 |
86 <H3>Value Classes</H3> |
86 <H3>Value Classes</H3> |
87 |
87 |
88 Classes ending in the suffix <code>PolicyValue</code> provide the values used |
88 Classes ending in the suffix <code>PolicyValue</code> provide the values used |
89 for the <code>create_POA</code> call, which sets the policy for the POA. See |
89 for the <code>create_POA</code> call, which sets the policy for the POA. See |
90 the <a href="#sampleserver">sample code</a> below for a demonstration. |
90 the <a href="#sampleserver">sample code</a> below for a demonstration. |
91 <code>PolicyValue</code> files include the following: |
91 <code>PolicyValue</code> files include the following: |
92 <UL> |
92 <UL> |
93 <LI><code>IdAssignmentPolicyValue</code> |
93 <LI><code>IdAssignmentPolicyValue</code> |
94 <LI><code>IdUniquenessPolicyValue</code> |
94 <LI><code>IdUniquenessPolicyValue</code> |
95 <LI><code>ImplicitActivationPolicyValue</code> |
95 <LI><code>ImplicitActivationPolicyValue</code> |
96 <LI><code>LifespanPolicyValue</code> |
96 <LI><code>LifespanPolicyValue</code> |
97 <LI><code>RequestProcessingPolicyValue</code> |
97 <LI><code>RequestProcessingPolicyValue</code> |
98 <LI><code>ServantRetentionPolicyValue</code> |
98 <LI><code>ServantRetentionPolicyValue</code> |
99 <LI><code>ThreadPolicyValue</code> |
99 <LI><code>ThreadPolicyValue</code> |
100 </UL> |
100 </UL> |
101 |
101 |
102 <H3>Helper Classes</H3> |
102 <H3>Helper Classes</H3> |
103 |
103 |
104 <P>Helper classes, which are generated for all user-defined types in an OMG IDL |
104 <P>Helper classes, which are generated for all user-defined types in an OMG IDL |
105 interface, supply static methods needed to manipulate those types. |
105 interface, supply static methods needed to manipulate those types. |
106 There is only one method in a helper class that an application programmer uses: |
106 There is only one method in a helper class that an application programmer uses: |
107 the <code>narrow</code> method. Only Java interfaces mapped from IDL interfaces |
107 the <code>narrow</code> method. Only Java interfaces mapped from IDL interfaces |
108 will have a helper class that includes a <code>narrow</code> method, so in |
108 will have a helper class that includes a <code>narrow</code> method, so in |
109 the <code>PortableServer</code> package, only the following classes have a <code>narrow</code> method: |
109 the <code>PortableServer</code> package, only the following classes have a <code>narrow</code> method: |
110 <UL> |
110 <UL> |
111 <LI><code>ForwardRequestHelper</code> |
111 <LI><code>ForwardRequestHelper</code> |
112 <LI><code>ServantActivatorHelper</code> |
112 <LI><code>ServantActivatorHelper</code> |
130 The result is that programmers will use only a few of the interfaces mentioned above. |
130 The result is that programmers will use only a few of the interfaces mentioned above. |
131 The remaining interfaces will be provided by the ORB implementation. |
131 The remaining interfaces will be provided by the ORB implementation. |
132 The interfaces of interest to application programmers are the following: |
132 The interfaces of interest to application programmers are the following: |
133 <ul> |
133 <ul> |
134 <LI><code>AdapterActivator</code> |
134 <LI><code>AdapterActivator</code> |
135 <P>Adapter activators are associated with POAs. |
135 <P>Adapter activators are associated with POAs. |
136 An adapter activator supplies a POA with the ability to create child POAs on demand, |
136 An adapter activator supplies a POA with the ability to create child POAs on demand, |
137 as a side-effect of receiving a request that names the child POA (or one of its children), |
137 as a side-effect of receiving a request that names the child POA (or one of its children), |
138 or when <code>find_POA</code> is called with an activate parameter value of <code>TRUE</code>. |
138 or when <code>find_POA</code> is called with an activate parameter value of <code>TRUE</code>. |
139 An application server that creates all its needed POAs at the beginning of execution |
139 An application server that creates all its needed POAs at the beginning of execution |
140 does not need to use or provide an adapter activator; it is necessary |
140 does not need to use or provide an adapter activator; it is necessary |
146 <P>When the POA has the <code>RETAIN</code> policy, |
146 <P>When the POA has the <code>RETAIN</code> policy, |
147 it uses servant managers that are <code>ServantActivator</code>s. |
147 it uses servant managers that are <code>ServantActivator</code>s. |
148 </ul> |
148 </ul> |
149 |
149 |
150 |
150 |
151 <H2>Package <TT>org.omg.PortableServer.ServantLocatorPackage</TT></H2> |
151 <H2>Package <code>org.omg.PortableServer.ServantLocatorPackage</code></H2> |
152 |
152 |
153 <P>This package supplies a <TT>CookieHolder</TT> class for passing |
153 <P>This package supplies a <code>CookieHolder</code> class for passing |
154 the <TT>Cookie</TT> type as an <code>out</code> parameter. The <code>CookieHolder</code> class |
154 the <code>Cookie</code> type as an <code>out</code> parameter. The <code>CookieHolder</code> class |
155 follows exactly the same pattern as the other holder classes for basic types. |
155 follows exactly the same pattern as the other holder classes for basic types. |
156 |
156 |
157 <H2>Related Documentation</H2> |
157 <H2>Related Documentation</H2> |
158 |
158 |
159 <P>For an overview of Java IDL, please see: |
159 <P>For an overview of Java IDL, please see: |