Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / docs / pluggable_protocols / index.html
blobc07c18a82174efe1d6be7f40576c56988a04a346
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
3 <!-- -->
5 <HTML>
6 <HEAD>
7 <TITLE>Implementing Pluggable Protocols for TAO</TITLE>
9 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
10 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
12 <LINK REL="STYLESHEET" HREF="pluggable_protocols.css">
14 </HEAD>
16 <BODY TEXT = "#000000" LINK="#000fff" VLINK="#ff0f0f" BGCOLOR="#ffffff">
18 <P>
20 <H1 ALIGN="CENTER">Implementing Pluggable Protocols for TAO</H1>
21 <P ALIGN="CENTER">
22 <STRONG>
23 <A HREF="http://www.cs.wustl.edu/~fredk/">Fred Kuhns</A>,
24 <A HREF="http://www.ece.uci.edu/~schmidt/">Douglas C. Schmidt</A>,
25 <A HREF="http://doc.ece.uci.edu/~coryan">Carlos O'Ryan</A>,
26 <A HREF="http://www.ece.uci.edu/~ossama/">Ossama Othman</A>,
27 and <A HREF="mailto:BTRASK@contactsystems.com">Bruce Trask</A>
28 </STRONG>
29 </P>
31 <P ALIGN="CENTER">
32 Center for Distributed Object Computing<BR>
33 Washington University at St.Louis
34 </P>
36 <HR>
38 <P>
39 <H3>Overview</H3><P>
41 To be an effective platform for performance-sensitive real-time and
42 embedded applications, off-the-shelf CORBA middleware must preserve
43 the communication-layer quality of service (QoS) properties of
44 applications end-to-end. However, the standard CORBA GIOP/IIOP
45 interoperability protocols are not well suited for applications that
46 cannot tolerate the message footprint size, latency, and jitter
47 associated with general-purpose messaging and transport protocols.
48 Fortunately, the CORBA specification defines the notion of
49 "Environmentally-Specific Inter-ORB Protocols" (ESIOPs) that can be
50 used to integrate non-GIOP/IIOP protocols beneath an ORB. <P>
52 To allow end-users and developers to take advantage of ESIOP
53 capabilities, it is useful for an ORB to support a <EM>pluggable
54 protocols framework</em> that allows custom messaging and transport
55 protocols to be configured flexibly and used transparently by
56 applications. This document explains how to develop pluggable
57 protocols using TAO's pluggable protocols framework. Here are some
58 links that describe TAO's pluggable protocols framework, though not
59 how to implement one: <BLOCKQUOTE> <A
60 HREF="../releasenotes/index.html#pp">../releasenotes/index.html#pp</A><BR>
62 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/PfHSN.pdf">http://www.dre.vanderbilt.edu/~schmidt/PDF/PfHSN.pdf</A><BR>
64 HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/pluggable_protocols.pdf">http://www.dre.vanderbilt.edu/~schmidt/PDF/pluggable_protocols.pdf</A>
65 </BLOCKQUOTE>
67 <P>
68 <HR>
69 <H3>Table of Contents</H3><P>
70 <UL>
71 <LI><A NAME="TOC_SECTION100" HREF="#SECTION100">Overview of Implementation of Pluggable Protocols for TAO</A>
72 <UL>
73 <LI><A NAME="TOC_SECTION110" HREF="#SECTION110">The Hard Way</A>
74 <LI><A NAME="TOC_SECTION120" HREF="#SECTION120">The Path of Least Resistance</A>
75 <UL>
76 <LI><A NAME="TOC_SECTION121" HREF="#SECTION121">Basic Requirements</A>
77 <LI><A NAME="TOC_SECTION122" HREF="#SECTION122">Basics of Implementing a Pluggable Protocol for TAO</A>
78 </UL>
79 </UL>
80 <LI><A NAME="TOC_SECTION200" HREF="#SECTION200">Pluggable Protocol Framework Components</A>
81 <UL>
82 <LI><A NAME="TOC_SECTION210" HREF="#SECTION210">The <TT>Acceptor</TT></A>
83 <UL>
84 <LI><A NAME="TOC_SECTION211" HREF="#SECTION211">Context</A>
85 <LI><A NAME="TOC_SECTION212" HREF="#SECTION212">Problem</A>
86 <LI><A NAME="TOC_SECTION213" HREF="#SECTION213">Solution</A>
87 <LI><A NAME="TOC_SECTION214" HREF="#SECTION214">Applying the solution to TAO</A>
88 <LI><A NAME="TOC_SECTION215" HREF="#SECTION215"><TT>Acceptor</TT> Implementation</A>
89 </UL>
90 <LI><A NAME="TOC_SECTION220" HREF="#SECTION220">The <TT>Connector</TT></A>
91 <UL>
92 <LI><A NAME="TOC_SECTION221" HREF="#SECTION221">Context</A>
93 <LI><A NAME="TOC_SECTION222" HREF="#SECTION222">Problem</A>
94 <LI><A NAME="TOC_SECTION223" HREF="#SECTION223">Solution</A>
95 <LI><A NAME="TOC_SECTION224" HREF="#SECTION224">Applying the solution in TAO</A>
96 <LI><A NAME="TOC_SECTION225" HREF="#SECTION225"><TT>Connector</TT> Implementation</A>
97 </UL>
98 <LI><A NAME="TOC_SECTION230" HREF="#SECTION230">The <TT>Profile</TT> Object</A>
99 <LI><A NAME="TOC_SECTION240" HREF="#SECTION240">The <TT>Protocol_Factory</TT> Object</A>
100 <LI><A NAME="TOC_SECTION250" HREF="#SECTION250">The <TT>Transport</TT> Object</A>
101 <UL>
102 <LI><A NAME="TOC_SECTION251" HREF="#SECTION251">Context</A>
103 <LI><A NAME="TOC_SECTION252" HREF="#SECTION252">Problem</A>
104 <LI><A NAME="TOC_SECTION253" HREF="#SECTION253">Solution</A>
105 <LI><A NAME="TOC_SECTION254" HREF="#SECTION254">Applying the solution in TAO</A>
106 <LI><A NAME="TOC_SECTION255" HREF="#SECTION255"><TT>Transport</TT> Implementation</A>
107 </UL>
108 <LI><A NAME="TOC_SECTION260" HREF="#SECTION260">The <TT>Connection_Handler</TT></A></LI>
109 <UL>
110 <LI><A NAME="TOC_SECTION261" HREF="#SECTION261"><TT>Connection_Handler</TT> Implementation</A></LI>
111 </UL>
112 </UL>
113 <LI><A NAME="TOC_SECTION300" HREF="#SECTION300">Notes From a ``Real World'' Pluggable Protocol Implementation</A>
114 <LI><A NAME="TOC_SECTION400" HREF="#SECTION400">Additional Implementation Information</A>
115 <UL>
116 <LI><A NAME="TOC_SECTION410" HREF="#SECTION410">Tags</A></LI>
117 </UL>
118 <LI><A NAME="TOC_SECTION500" HREF="#SECTION500">Using a Pluggable Protocol</A>
119 <LI><A NAME="TOC_SECTION600" HREF="#SECTION600">Bibliography</A>
120 </UL>
121 <!-- End of Table of Contents -->
122 <BR><HR>
127 <H3><A NAME="SECTION100" HREF="#TOC_SECTION100">
128 Overview of Implementation of Pluggable Protocols for TAO</A>
129 </H3>
132 There are several basic implementation details that should be followed when
133 implementing pluggable protocols for
134 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/TAO.html">TAO</A>. This
135 section describes them.
139 <H3><A NAME="SECTION110" HREF="#TOC_SECTION110">
140 The Hard Way</A>
141 </H3>
144 It is possible to implement a pluggable protocol for TAO without using
145 any <A HREF="http://www.dre.vanderbilt.edu/~schmidt/ACE.html">ACE</A>
146 components, or using existing pluggable protocols as a reference, but that is
147 certainly more difficult than taking advantage of the code reuse offered by
148 using existing ACE and TAO models and implementations.
152 <H3><A NAME="SECTION120" HREF="#TOC_SECTION120">
153 The Path of Least Resistance</A>
154 </H3>
157 TAO takes advantage of the many useful encapsulations provided by ACE. These
158 include ACE's <TT>IPC_SAP</TT> classes, <TT>Event Handlers</TT> and the operation
159 dispatching features provided by the <TT>Reactor</TT>. However, in order to
160 use these encapsulations some requirements must be satisfied.
164 <H3><A NAME="SECTION121" HREF="#TOC_SECTION121">
165 Basic Requirements</A>
166 </H3>
169 To be able to successfully use the ACE components listed above, the underlying
170 protocol used in the pluggable protocol for TAO should support the following
171 features and characteristics:
175 <UL>
176 <LI>Access to a session/connection via some type of handle (e.g. a UNIX file descriptor
177 or a Win32 <TT>HANDLE</TT>).</LI>
178 <LI>The ability to multiplex I/O using the <TT>select</TT> system call, or on Win32
179 platforms, the <TT>WaitForMultipleObjects</TT> call on the handles that refer
180 to the open sessions/connections. This ability is required in order to use the
181 <TT>ACE_Select_Reactor</TT> or the <TT>ACE_WFMO_Reactor</TT> concrete <TT>Reactor</TT>
182 implementations.
185 Some underlying transports do not provide any such ability. However, it may
186 sometimes be possible to separate data delivery from notification. For example,
187 TAO's shared memory transport transports data through shared memory, but since
188 it is not possible to use <TT>select</TT> on shared memory another mechanism
189 must be used for notification. One way to do this is to use a local IPC connection
190 strictly for notification purposes. Whenever, data is sent through shared memory,
191 a byte of data could be written to the local IPC connection. That local IPC
192 connection would be used to notify the receiving process that data is available
193 for reading in shared memory. Since local IPC can be multiplexed using the <TT>select</TT>
194 system call, the <TT>ACE_Select_Reactor</TT> can be used to handle operation
195 dispatching for the shared memory pluggable protocol.
198 </LI>
199 <LI>A pluggable protocol should sit on top of lower-level implementation. The underlying
200 protocol implementation should not rely on any resources/features that are at
201 a similar or higher layer of abstraction than the pluggable protocol. For example,
202 if the underlying protocol needs to use Win32 resources/features such as <TT>HANDLE</TT>s
203 to hidden windows or the use of a window message pump then the underlying pluggable
204 protocol may be difficult or pointless to implement as a pluggable protocol.</LI>
205 </UL>
209 <H3><A NAME="SECTION122" HREF="#TOC_SECTION122">
210 Basics of Implementing a Pluggable Protocol for TAO</A>
211 </H3>
214 One of the easiest ways to implement a pluggable protocol for TAO is to do the
215 following:
219 <OL>
220 <LI>Implement ACE <TT>IPC_SAP</TT> wrappers around the underlying protocol implementation.
221 For example, ACE wraps the <I>socket</I> API to create an <TT>ACE_INET_Addr</TT>,
222 <TT>ACE_SOCK_Acceptor</TT>, <TT>ACE_SOCK_Connector</TT> and <TT>ACE_SOCK_Stream</TT>.
223 <TT>IPC_SAP</TT> wrappers for other implementations, such as OSI transport
224 protocol layer 4, aka <I>TP4</I>, should be implemented similarly. A TP4 implementation
225 could have an <TT>ACE_TP4_Addr</TT>, <TT>ACE_TP4_Acceptor</TT>, <TT>ACE_TP4_Connector</TT>
226 and an <TT>ACE_TP4_Stream</TT>. Any new implementation should retain the interface
227 provided by the base <TT>IPC_SAP</TT> classes in ACE.</LI> <P>
229 <LI>Once the above ACE <TT>IPC_SAP</TT> components have been implemented, creating
230 the necessary TAO pluggable protocol components should be fairly easy. In fact,
231 much of the code can be ``cut and pasted'' from existing TAO pluggable protocol
232 implementations. For example, TAO's UIOP pluggable protocol was, for the most
233 part, based entirely on the IIOP pluggable protocol code found in TAO's ``tao/IIOP_*''
234 source files. The only things that had to be changed for UIOP were the protocol
235 prefix, address format and URL style IOR format. Each of these pluggable protocol
236 characteristics is documented later in this documentation.</LI>
237 </OL>
241 The next section goes into detail about TAO's pluggable protocol
242 framework components and their public interfaces. It is our goal that
243 no changes to ACE or TAO should be necessary to implement a pluggable
244 protocol. Naturally, as with all frameworks, it's only possible to
245 achieve this goal if (1) all possible use-cases are understood in
246 advance or (2) the framework is generalized when confronted with new
247 use-cases that weren't handled before. Therefore, we describe the
248 conditions that must currently hold in order to develop and integrate
249 a pluggable protocol for TAO.
251 <HR>
253 <H3><A NAME="SECTION200" HREF="#TOC_SECTION200">
254 Pluggable Protocol Framework Components</A>
255 </H3>
258 In order for a pluggable protocol to be usable by TAO <STRONG><EM>without</EM></STRONG> making any modifications
259 to TAO itself, it must be implemented to provide the functionality dictated
260 by TAO's pluggable protocols framework interface. This functionality is implemented
261 within several components, namely the <TT>Acceptor</TT>, <TT>Connector</TT>,
262 <TT>Connection Handler</TT>, <TT>Protocol Factory</TT>, <TT>Profile</TT> and
263 <TT>Transport</TT>. This section describes each of them.
267 <H3><A NAME="SECTION210" HREF="#TOC_SECTION210">
268 The <TT>Acceptor</TT></A>
269 </H3>
273 <A NAME="design:accept"></A>
276 <H3><A NAME="SECTION211" HREF="#TOC_SECTION211">
277 Context</A>
278 </H3>
281 A server can accept connections at one or more endpoints, potentially using
282 the same protocol for all endpoints. The set of protocols that an ORB uses to
283 play the client role need not match the set of protocols used for the server
284 role. Moreover, the ORB can even be a ``pure client,'' <I>i.e.</I>, a client
285 that only makes requests, in which case it can use several protocols to make
286 requests, but receive no requests from other clients.
290 <H3><A NAME="SECTION212" HREF="#TOC_SECTION212">
291 Problem</A>
292 </H3>
295 The server must generate an IOR that includes all possible inter-ORB and transport-protocol-specific
296 profiles for which the object can be accessed. As with the client, it should
297 be possible to add new protocols without changing the ORB.
301 <H3><A NAME="SECTION213" HREF="#TOC_SECTION213">
302 Solution</A>
303 </H3>
306 We use the Acceptor pattern&nbsp;[<A
307 HREF="#Schmidt:97c">1</A>] to accept the connections. As
308 with the Connector pattern, an Acceptor decouples the connection establishment
309 from the processing performed on that connection. However, in the Acceptor pattern,
310 the connection is accepted <I>passively</I>, rather than being initiated <I>actively</I>.
314 <H3><A NAME="SECTION214" HREF="#TOC_SECTION214">
315 Applying the solution to TAO</A>
316 </H3>
319 Figure&nbsp;<A HREF="#server">1</A> illustrates how TAO's pluggable protocols framework leverages
320 the design presented in Section&nbsp;<A HREF="#design:transparent"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]"
321 SRC="cross_ref_motif.png"></A>. The concrete ACE
322 <TT>Service Handler</TT> created by the ACE <TT>Acceptor</TT> is responsible
323 for implementing the External Polymorphism pattern&nbsp;[<A HREF="#Schmidt:97e">2</A>] and encapsulating itself
324 behind the <TT>Transport</TT> interface defined in our pluggable protocols framework.
328 <P></P>
329 <DIV ALIGN="CENTER"><A NAME="server"></A><A NAME="683"></A>
330 <TABLE>
331 <CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG>
332 Server Pluggable Protocol Class Diagram</CAPTION>
333 <TR><TD><P>
337 <DIV ALIGN="CENTER">
338 <!-- MATH
339 $\resizebox* {5in}{!}{\includegraphics{graphics/server.eps}}$
341 <IMG
342 WIDTH="561" HEIGHT="634" ALIGN="BOTTOM" BORDER="0"
343 SRC="img1.png"
344 ALT="Server"> </DIV>
346 <DIV ALIGN="CENTER"></DIV></TD></TR>
347 </TABLE>
348 </DIV><P></P>
351 As discussed in Section&nbsp;<A HREF="#design:adapt"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]"
352 SRC="cross_ref_motif.png"></A>, we use the Adapter pattern to leverage
353 the ACE implementation of the Acceptors. This pattern also permits a seamless
354 integration with the lower levels of the ORB. In the Acceptor pattern, the <TT>Acceptor</TT>
355 object is a factory that creates <TT>Service Handler</TT>s. <TT>Service
356 Handler</TT>s are responsible for performing I/O with their connected peers. In
357 TAO's pluggable protocol framework, the <TT>Transport</TT> objects are <TT>Service
358 Handlers</TT> implemented as abstract classes. This design shields the ORB from
359 variations in the <TT>Acceptor</TT>s, <TT>Connector</TT>s, and <TT>Service
360 Handler</TT>s for each particular protocol.
363 When a connection is established, the concrete <TT>Acceptor</TT> creates the
364 appropriate <TT>Connection Handler</TT> and IOP objects. The <TT>Connection
365 Handler</TT> also creates a <TT>Transport</TT> object that functions as a bridge.
366 As with the <TT>Connector</TT>, the <TT>Acceptor</TT> also acts as a bridge
367 object, hiding the transport- and strategy-specific details of the acceptor.
371 <H3><A NAME="SECTION215" HREF="#TOC_SECTION215">
372 <TT>Acceptor</TT> Implementation</A>
373 </H3>
376 TAO's <TT>Acceptor</TT> interface, shown below, is declared in the file
377 <TT>&lt;<A HREF="../../tao/Transport_Acceptor.h">tao/Transport_Acceptor.h</A>&gt;</TT>.
378 All <TT>Acceptor</TT> implementations must inherit from the <TT>TAO_Acceptor</TT>
379 abstract base class.
383 <DL COMPACT>
384 <DT>
385 <DD>class&nbsp;TAO_Export&nbsp;TAO_Acceptor<BR>
386 {<BR>
387 &nbsp;&nbsp;//&nbsp;=&nbsp;TITLE<BR>
388 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;Abstract&nbsp;Acceptor&nbsp;class&nbsp;used&nbsp;for&nbsp;pluggable&nbsp;protocols.<BR>
389 &nbsp;&nbsp;//<BR>
390 &nbsp;&nbsp;//&nbsp;=&nbsp;DESCRIPTION<BR>
391 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;Base&nbsp;class&nbsp;for&nbsp;the&nbsp;Acceptor&nbsp;bridge&nbsp;calls.<BR>
392 public:<BR>
393 &nbsp;&nbsp;TAO_Acceptor&nbsp;(CORBA::ULong&nbsp;tag);<BR>
394 &nbsp;
396 <BR>
398 &nbsp;&nbsp;virtual&nbsp;~TAO_Acceptor&nbsp;(void);
400 <BR>
402 &nbsp;&nbsp;//&nbsp;Destructor
404 <BR>
406 &nbsp;
408 <BR>
410 &nbsp;&nbsp;CORBA::ULong&nbsp;tag&nbsp;(void)&nbsp;const;
412 <BR>
414 &nbsp;&nbsp;//&nbsp;The&nbsp;tag,&nbsp;each&nbsp;concrete&nbsp;class&nbsp;will&nbsp;have&nbsp;a&nbsp;specific&nbsp;tag&nbsp;value.
416 <BR>
418 &nbsp;
420 <BR>
422 &nbsp;&nbsp;CORBA::Short&nbsp;priority&nbsp;(void)&nbsp;const;
424 <BR>
426 &nbsp;&nbsp;//&nbsp;The&nbsp;priority&nbsp;for&nbsp;this&nbsp;endpoint.
428 <BR>
430 &nbsp;
432 <BR>
434 &nbsp;&nbsp;virtual&nbsp;int&nbsp;open&nbsp;(TAO_ORB_Core&nbsp;*orb_core,
436 <BR>
438 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;version_major,
440 <BR>
442 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;version_minor,
444 <BR>
446 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;char&nbsp;*address,
448 <BR>
450 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;char&nbsp;*options&nbsp;=&nbsp;0)&nbsp;=&nbsp;0;
452 <BR>
454 &nbsp;&nbsp;//&nbsp;Method&nbsp;to&nbsp;initialize&nbsp;acceptor&nbsp;for&nbsp;address.
456 <BR>
458 &nbsp;
460 <BR>
462 &nbsp;&nbsp;virtual&nbsp;int&nbsp;open_default&nbsp;(TAO_ORB_Core&nbsp;*orb_core,
464 <BR>
466 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;char&nbsp;*options&nbsp;=&nbsp;0)&nbsp;=&nbsp;0;
468 <BR>
470 &nbsp;&nbsp;//&nbsp;Open&nbsp;an&nbsp;acceptor&nbsp;on&nbsp;the&nbsp;default&nbsp;endpoint&nbsp;for&nbsp;this&nbsp;protocol
472 <BR>
474 &nbsp;
476 <BR>
478 &nbsp;&nbsp;virtual&nbsp;int&nbsp;close&nbsp;(void)&nbsp;=&nbsp;0;
480 <BR>
482 &nbsp;&nbsp;//&nbsp;Closes&nbsp;the&nbsp;acceptor
484 <BR>
486 &nbsp;
488 <BR>
490 &nbsp;&nbsp;virtual&nbsp;int&nbsp;create_mprofile&nbsp;(const&nbsp;TAO_ObjectKey&nbsp;&amp;object_key,
492 <BR>
494 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_MProfile&nbsp;&amp;mprofile)&nbsp;=&nbsp;0;
496 <BR>
498 &nbsp;&nbsp;//&nbsp;Create&nbsp;the&nbsp;corresponding&nbsp;profile&nbsp;for&nbsp;this&nbsp;endpoint.
500 <BR>
502 &nbsp;
504 <BR>
506 &nbsp;&nbsp;virtual&nbsp;int&nbsp;is_collocated&nbsp;(const&nbsp;TAO_Profile*&nbsp;profile)&nbsp;=&nbsp;0;
508 <BR>
510 &nbsp;&nbsp;//&nbsp;Return&nbsp;1&nbsp;if&nbsp;the&nbsp;&lt;profile&gt;&nbsp;has&nbsp;the&nbsp;same&nbsp;endpoint&nbsp;as&nbsp;the&nbsp;acceptor.
512 <BR>
514 &nbsp;
516 <BR>
518 &nbsp;&nbsp;virtual&nbsp;CORBA::ULong&nbsp;endpoint_count&nbsp;(void)&nbsp;=&nbsp;0;
520 <BR>
522 &nbsp;&nbsp;//&nbsp;Returns&nbsp;the&nbsp;number&nbsp;of&nbsp;endpoints&nbsp;this&nbsp;acceptor&nbsp;is&nbsp;listening&nbsp;on.&nbsp;&nbsp;This
524 <BR>
526 &nbsp;&nbsp;//&nbsp;is&nbsp;used&nbsp;for&nbsp;determining&nbsp;how&nbsp;many&nbsp;profiles&nbsp;will&nbsp;be&nbsp;generated
528 <BR>
530 &nbsp;&nbsp;//&nbsp;for&nbsp;this&nbsp;acceptor.
532 <BR>
534 &nbsp;
536 <BR>
537 protected:
539 <BR>
541 &nbsp;&nbsp;CORBA::Short&nbsp;priority_;
543 <BR>
545 &nbsp;&nbsp;//&nbsp;The&nbsp;priority&nbsp;for&nbsp;this&nbsp;endpoint
547 <BR>
549 &nbsp;
551 <BR>
552 private:
554 <BR>
556 &nbsp;&nbsp;CORBA::ULong&nbsp;tag_;
558 <BR>
560 &nbsp;&nbsp;//&nbsp;IOP&nbsp;protocol&nbsp;tag.
562 <BR>
564 &nbsp;
566 <BR>
570 &nbsp;</DD>
571 </DL>
572 A description of each of the methods that must be implemented follows:
576 <DL>
577 <DT><STRONG>The&nbsp;Constructor.</STRONG></DT>
578 <DD>Other than initializing members of a pluggable protocol <TT>Acceptor</TT>
579 implementation, nothing else is really done in the constructor. For example,
580 the <TT>TAO_IIOP_Acceptor</TT> constructor implementation is:
583 <DL COMPACT>
584 <DT>
585 <DD>TAO_IIOP_Acceptor::TAO_IIOP_Acceptor&nbsp;(void)<BR>
586 <DD>&nbsp;&nbsp;:&nbsp;TAO_Acceptor&nbsp;(TAO_TAG_IIOP_PROFILE),
588 <BR>
590 &nbsp;&nbsp;&nbsp;&nbsp;version_&nbsp;(TAO_DEF_GIOP_MAJOR,&nbsp;TAO_DEF_GIOP_MINOR),
592 <BR>
594 &nbsp;&nbsp;&nbsp;&nbsp;orb_core_&nbsp;(0),
596 <BR>
598 &nbsp;&nbsp;&nbsp;&nbsp;base_acceptor_&nbsp;(),
600 <BR>
602 &nbsp;&nbsp;&nbsp;&nbsp;creation_strategy_&nbsp;(0),
604 <BR>
606 &nbsp;&nbsp;&nbsp;&nbsp;concurrency_strategy_&nbsp;(0),
608 <BR>
610 &nbsp;&nbsp;&nbsp;&nbsp;accept_strategy_&nbsp;(0)
612 <BR>
616 <BR>
618 }</DD>
619 </DL>
621 Note that initializing the <TT>TAO_Acceptor</TT> base class with a
622 <I>tag</I> value is required. Additional information about tags is
623 available in the
624 <A HREF="#SECTION410">tags section</A>
625 of this document. In this case,
626 <TT>TAO_TAG_IIOP_PROFILE</TT> is defined to be the OMG assigned tag
627 for the CORBA IIOP protocol. Until a tag that uniquely
628 identifies the protocol is assigned, a tag value that isn't
629 used by any other protocol can be used in the meantime.
630 </DL>
633 <DL>
634 <DT><STRONG><TT><A NAME="TAO_Acceptor::open">open</A></TT>.</STRONG></DT>
635 <DD>The <TT>open</TT> method initializes the acceptor, i.e. sets
636 the protocol version to use (if supported), parses any protocol-specific options
637 (if any) and creates the endpoint passed to it.
639 The address specified by using the <TT><A HREF="../Options.html#-ORBEndpoint">-ORBEndpoint</A></TT> ORB option is passed
640 directly to this method. If more than one address is specified within a given
641 <TT>-ORBEndpoint</TT> option then each address is passed one by one to this
642 method by the pluggable protocols framework. For example, the following <TT>-ORBEndpoint</TT>
643 command line option:
647 <DL COMPACT>
648 <DT>
649 <DD>-ORBEndpoint&nbsp;iiop://1.1@foo.xyz.com,1.0@bar.abc.com</DD>
650 </DL>
652 will cause the following <TT>open</TT> method invocations to occur:
656 <DL COMPACT>
657 <DT>
658 <DD>open&nbsp;(orb_core,&nbsp;1,&nbsp;1,&nbsp;&#34;foo.xyz.com&#34;,&nbsp;0)<BR>
659 open&nbsp;(orb_core,&nbsp;1,&nbsp;0,&nbsp;&#34;bar.abc.com&#34;,&nbsp;0)</DD>
660 </DL>
662 Extracting individual addresses from an <TT>-ORBEndpoint</TT> option is handled
663 by TAO's pluggable protocols framework. It is up to the pluggable protocol to
664 handle the address passed to this method.
667 </DD>
668 <DT><STRONG><TT><A NAME="TAO_Acceptor::open_default">open_default</A></TT>.</STRONG></DT>
669 <DD>Each pluggable protocol should have the ability to
670 open a default endpoint. For example, it should be possible to make the pluggable
671 protocol open an endpoint without specifying an address, in which case an address
672 is chosen by the pluggable protocol. This method is invoked when <TT>-ORBEndpoint</TT>
673 options such as the following are used:
677 <DL COMPACT>
678 <DT>
679 <DD>-ORBEndpoint&nbsp;iiop://</DD>
680 </DL>
681 <P>In this case, an IIOP endpoint will be created on the local host. The port will
682 be chosen by the IIOP pluggable protocol. <TT>open_default</TT> will invoked
683 in the following manner:
687 <DL COMPACT>
688 <DT>
689 <DD><TT>open_default&nbsp;(orbcore,&nbsp;0)</TT></DD>
690 </DL></DD>
692 <DT><STRONG><TT>close</TT>.</STRONG></DT>
693 <DD>The <TT>close</TT> method is self-explanatory. It simply shuts
694 down any open endpoints, and recovers resources as necessary. This method is
695 automatically invoked by the pluggable protocols framework when the ORB associated
696 with that endpoint is shut down.</DD>
698 <DT><STRONG><TT>create_mprofile</TT>.</STRONG></DT>
699 <DD>The <TT>create_mprofile</TT> method creates a protocol-specific
700 <TT>Profile</TT> object and gives ownership of that profile to the <TT>TAO_MProfile</TT>
701 object, basically a container that holds multiple profiles, passed to it. The
702 code for this method is typically ``boilerplate,'' i.e. it can be based almost
703 entirely on TAO's existing pluggable protocol implementations of <TT>create_profile</TT>.
704 Here is how it is implemented in TAO's IIOP acceptor:
708 <DL COMPACT>
709 <DT>
710 <DD>int<BR>
711 TAO_IIOP_Acceptor::create_mprofile&nbsp;(const&nbsp;TAO_ObjectKey&nbsp;&amp;object_key,&nbsp;<BR>
712 TAO_MProfile&nbsp;&amp;mprofile)&nbsp;
713 <BR>
714 {&nbsp;
715 <BR>
716 &nbsp;&nbsp;//&nbsp;@@&nbsp;we&nbsp;only&nbsp;make&nbsp;one&nbsp;for&nbsp;now&nbsp;
717 <BR>
718 &nbsp;&nbsp;int&nbsp;count&nbsp;=&nbsp;mprofile.profile_count&nbsp;();&nbsp;
719 <BR>
720 &nbsp;&nbsp;if&nbsp;((mprofile.size&nbsp;()&nbsp;-&nbsp;count)&nbsp;&lt;&nbsp;1&nbsp;
721 <BR>
722 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp;&nbsp;mprofile.grow&nbsp;(count&nbsp;+&nbsp;1)&nbsp;==&nbsp;-1)&nbsp;
723 <BR>
724 &nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;-1;&nbsp;
725 <BR>
726 &nbsp;
727 <BR>
728 &nbsp;&nbsp;TAO_IIOP_Profile&nbsp;*pfile&nbsp;=&nbsp;0;&nbsp;
729 <BR>
730 &nbsp;&nbsp;ACE_NEW_RETURN&nbsp;(pfile,&nbsp;
731 <BR>
732 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_IIOP_Profile&nbsp;(this-&gt;host_.c_str&nbsp;(),&nbsp;
733 <BR>
734 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;address_.get_port_number&nbsp;(),&nbsp;
735 <BR>
736 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;object_key,&nbsp;
737 <BR>
738 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;address_,&nbsp;
739 <BR>
740 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;version_,&nbsp;
741 <BR>
742 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;orb_core_),&nbsp;
743 <BR>
744 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-1);&nbsp;
745 <BR>
746 &nbsp;
747 <BR>
748 &nbsp;&nbsp;if&nbsp;(mprofile.give_profile&nbsp;(pfile)&nbsp;==&nbsp;-1)&nbsp;
749 <BR>
750 &nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
751 <BR>
752 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pfile-&gt;_decr_refcnt&nbsp;();&nbsp;
753 <BR>
754 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pfile&nbsp;=&nbsp;0;&nbsp;
755 <BR>
756 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;-1;&nbsp;
757 <BR>
758 &nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
759 <BR>
760 &nbsp;
761 <BR>
762 &nbsp;&nbsp;if&nbsp;(this-&gt;orb_core_-&gt;orb_params&nbsp;()-&gt;std_profile_components&nbsp;()&nbsp;==&nbsp;0)&nbsp;
763 <BR>
764 &nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;0;&nbsp;
765 <BR>
766 &nbsp;
767 <BR>
768 &nbsp;&nbsp;pfile-&gt;tagged_components&nbsp;().set_orb_type&nbsp;(TAO_ORB_TYPE);&nbsp;
769 <BR>
770 &nbsp;
771 <BR>
772 &nbsp;&nbsp;CONV_FRAME::CodeSetComponentInfo&nbsp;code_set_info;&nbsp;
773 <BR>
774 &nbsp;&nbsp;code_set_info.ForCharData.native_code_set&nbsp;&nbsp;=&nbsp;
775 <BR>
776 &nbsp;&nbsp;&nbsp;&nbsp;TAO_DEFAULT_CHAR_CODESET_ID;&nbsp;
777 <BR>
778 &nbsp;&nbsp;code_set_info.ForWcharData.native_code_set&nbsp;=&nbsp;
779 <BR>
780 &nbsp;&nbsp;&nbsp;&nbsp;TAO_DEFAULT_WCHAR_CODESET_ID;&nbsp;
781 <BR>
782 &nbsp;&nbsp;pfile-&gt;tagged_components&nbsp;().set_code_sets&nbsp;(code_set_info);&nbsp;
783 <BR>
784 &nbsp;
785 <BR>
786 &nbsp;&nbsp;pfile-&gt;tagged_components&nbsp;().set_tao_priority&nbsp;(this-&gt;priority&nbsp;());&nbsp;
787 <BR>
788 &nbsp;
789 <BR>
790 &nbsp;&nbsp;return&nbsp;0;
794 }</DD>
795 </DL>
797 Most of the code that is common to all pluggable protocols will be factored
798 out of this method in the near future.
801 </DD>
802 <DT><STRONG><TT>is_collocated</TT>.</STRONG></DT>
803 <DD>The <TT>is_collocated</TT> method checks if the <TT>Profile</TT>
804 has the same endpoint as the <TT>Acceptor</TT>. Assuming ACE is used as the
805 underlying layer between the operating system calls and a pluggable protocol,
806 this code is also ``boilerplate.'' TAO's IIOP implementation does the following:
810 <DL COMPACT>
811 <DT>
812 <DD>int&nbsp;
813 <BR>
814 TAO_IIOP_Acceptor::is_collocated&nbsp;(const&nbsp;TAO_Profile&nbsp;*pfile)&nbsp;
815 <BR>
816 {&nbsp;
817 <BR>
818 &nbsp;&nbsp;const&nbsp;TAO_IIOP_Profile&nbsp;*profile&nbsp;=&nbsp;
819 <BR>
820 &nbsp;&nbsp;&nbsp;&nbsp;ACE_dynamic_cast(const&nbsp;TAO_IIOP_Profile&nbsp;*,&nbsp;
821 <BR>
822 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pfile);&nbsp;
823 <BR>
824 &nbsp;
825 <BR>
826 &nbsp;&nbsp;//&nbsp;compare&nbsp;the&nbsp;port&nbsp;and&nbsp;sin_addr&nbsp;(numeric&nbsp;host&nbsp;address)&nbsp;
827 <BR>
828 &nbsp;&nbsp;return&nbsp;profile-&gt;object_addr&nbsp;()&nbsp;==&nbsp;this-&gt;address_;&nbsp;
829 <BR>
830 }</DD>
831 </DL></DD>
833 <DT><STRONG><TT>endpoint_count</TT>.</STRONG></DT>
834 <DD><TT>endpoint_count</TT> returns the number of endpoints
835 the <TT>Acceptor</TT> is listening on. This is used for determining how many
836 <TT>Profiles</TT> will be generated for this <TT>Acceptor</TT>. Currently, all
837 of TAO's pluggable protocols simply return <TT>1</TT>.</DD>
838 </DL>
842 <H3><A NAME="SECTION220" HREF="#TOC_SECTION220">
843 The <TT>Connector</TT></A>
844 </H3>
848 <A NAME="design:connect"></A>
851 <H3><A NAME="SECTION221" HREF="#TOC_SECTION221">
852 Context</A>
853 </H3>
856 When a client references an object, the ORB must obtain the corresponding profile
857 list, which is derived from the IOR and a profile ordering policy, and transparently
858 establish a connection to the server.
862 <H3><A NAME="SECTION222" HREF="#TOC_SECTION222">
863 Problem</A>
864 </H3>
867 There can be one or more combinations of inter-ORB and transport protocols available
868 in an ORB. For a given profile, the ORB must verify the presence of the associated
869 IOP and transport protocol, if available. It must then locate the applicable
870 <TT>Connector</TT> and delegate it to establish the connection.
874 <H3><A NAME="SECTION223" HREF="#TOC_SECTION223">
875 Solution</A>
876 </H3>
879 We use the Connector pattern&nbsp;[<A
880 HREF="#Schmidt:97c">1</A>] to actively establish a connection
881 to a remote object. This pattern decouples the connection establishment from
882 the processing performed after the connection is successful. As before, the
883 <TT>Connector Registry</TT> shown in Figure&nbsp;<A HREF="#e2e">2</A> is used
885 <P></P>
886 <DIV ALIGN="CENTER"><A NAME="e2e"></A><A NAME="184"></A>
887 <TABLE>
888 <CAPTION ALIGN="BOTTOM"><STRONG>Figure 2:</STRONG>
889 Connection Establishment Using Multiple Pluggable Protocols</CAPTION>
890 <TR><TD><P>
896 <DIV ALIGN="CENTER">
897 <!-- MATH
898 $\resizebox* {9cm}{!}{\includegraphics{graphics/pp_e2e.eps}}$
900 <IMG
901 WIDTH="405" HEIGHT="460" ALIGN="BOTTOM" BORDER="0"
902 SRC="img2.png"
903 ALT="pp_e2e"> </DIV>
905 <DIV ALIGN="CENTER"></DIV></TD></TR>
906 </TABLE>
907 </DIV><P></P>
908 to locate the right <TT>Connector</TT> for the current profile. The actual
909 profile selected for use will depend on the set of Policies active at the time
910 of connection establishment. However, once a profile is selected, the connector
911 registry matches the profile type, represented by a well known tag, with an
912 instance of a concrete <TT>Connector</TT>.
916 <H3><A NAME="SECTION224" HREF="#TOC_SECTION224">
917 Applying the solution in TAO</A>
918 </H3>
921 As described in Section&nbsp;<A HREF="#design:adapt"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]"
922 SRC="cross_ref_motif.png"></A>, <TT>Connector</TT>s are adapters
923 for the ACE implementation of the Connector pattern. Thus, they are typically
924 lightweight objects that simply delegate to a corresponding ACE component.
927 Figure&nbsp;<A HREF="#client">3</A> shows the base classes and their relations for IIOP.
929 <P></P>
930 <DIV ALIGN="CENTER"><A NAME="client"></A><A NAME="688"></A>
931 <TABLE>
932 <CAPTION ALIGN="BOTTOM"><STRONG>Figure 3:</STRONG>
933 Client Pluggable Protocol Class Diagram</CAPTION>
934 <TR><TD><P>
938 <DIV ALIGN="CENTER">
939 <!-- MATH
940 $\resizebox* {5in}{!}{\includegraphics{graphics/client.eps}}$
942 <IMG
943 WIDTH="563" HEIGHT="416" ALIGN="BOTTOM" BORDER="0"
944 SRC="img3.png"
945 ALT="Client"> </DIV>
947 <DIV ALIGN="CENTER"></DIV></TD></TR>
948 </TABLE>
949 </DIV><P></P>
950 This figure shows an explicit co-variance between the <TT>Profile</TT> and
951 the <TT>Connector</TT>s for each protocol. In general, a <TT>Connector</TT>
952 must downcast the <TT>Profile</TT> to its specific type. This downcast is safe
953 because profile creation is limited to the <TT>Connector</TT> and <TT>Acceptor</TT>
954 registries. In both cases, the profile is created with a matching tag. The tag
955 is used by the Connector Registry to choose the <TT>Connector</TT> that can
956 handle each profile.
959 As shown in the same figure, the Connector Registry manipulates only the base
960 classes. Therefore, new protocols can be added without requiring any modification
961 to the existing pluggable protocols framework. When a connection is successfully
962 established, the <TT>Profile</TT> is passed a pointer to the particular IOP
963 object and to the <TT>Transport</TT> objects that were created.
967 <H3><A NAME="SECTION225" HREF="#TOC_SECTION225">
968 <TT>Connector</TT> Implementation</A>
969 </H3>
972 TAO's <TT>Connector</TT> interface, shown below, is declared in the file <TT>&lt;
973 <A HREF="../../tao/Transport_Connector.h">tao/Transport_Connector.h</A>&gt;</TT>.
974 All <TT>Connector</TT> implementations must inherit from the <TT>TAO_Connector</TT>
975 abstract base class.
979 <DL COMPACT>
980 <DT>
981 <DD>class&nbsp;TAO_Export&nbsp;TAO_Connector&nbsp;
982 <BR>
983 {&nbsp;
984 <BR>
985 &nbsp;&nbsp;//&nbsp;=&nbsp;TITLE&nbsp;
986 <BR>
987 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;Generic&nbsp;Connector&nbsp;interface&nbsp;definitions.&nbsp;
988 <BR>
989 &nbsp;&nbsp;//&nbsp;
990 <BR>
991 &nbsp;&nbsp;//&nbsp;=&nbsp;DESCRIPTION&nbsp;
992 <BR>
993 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;Base&nbsp;class&nbsp;for&nbsp;connector&nbsp;bridge&nbsp;object.&nbsp;
994 <BR>
995 public:&nbsp;
996 <BR>
997 &nbsp;
998 <BR>
999 &nbsp;&nbsp;TAO_Connector&nbsp;(CORBA::ULong&nbsp;tag);&nbsp;
1000 <BR>
1001 &nbsp;&nbsp;//&nbsp;default&nbsp;constructor.&nbsp;
1002 <BR>
1003 &nbsp;
1004 <BR>
1005 &nbsp;&nbsp;virtual&nbsp;~TAO_Connector&nbsp;(void);&nbsp;
1006 <BR>
1007 &nbsp;&nbsp;//&nbsp;the&nbsp;destructor.&nbsp;
1008 <BR>
1009 &nbsp;
1010 <BR>
1011 &nbsp;&nbsp;CORBA::ULong&nbsp;tag&nbsp;(void)&nbsp;const;&nbsp;
1012 <BR>
1013 &nbsp;&nbsp;//&nbsp;The&nbsp;tag&nbsp;identifying&nbsp;the&nbsp;specific&nbsp;ORB&nbsp;transport&nbsp;layer&nbsp;protocol.&nbsp;
1014 <BR>
1015 &nbsp;&nbsp;//&nbsp;For&nbsp;example&nbsp;TAO_TAG_IIOP_PROFILE&nbsp;=&nbsp;0.&nbsp;&nbsp;The&nbsp;tag&nbsp;is&nbsp;used&nbsp;in&nbsp;the&nbsp;
1016 <BR>
1017 &nbsp;&nbsp;//&nbsp;IOR&nbsp;to&nbsp;identify&nbsp;the&nbsp;type&nbsp;of&nbsp;profile&nbsp;included.&nbsp;IOR&nbsp;-&gt;&nbsp;{{tag0,&nbsp;
1018 <BR>
1019 &nbsp;&nbsp;//&nbsp;profile0}&nbsp;{tag1,&nbsp;profole1}&nbsp;...}&nbsp;&nbsp;GIOP.h&nbsp;defines&nbsp;typedef&nbsp;
1020 <BR>
1021 &nbsp;&nbsp;//&nbsp;CORBA::ULong&nbsp;TAO_IOP_Profile_ID;&nbsp;
1022 <BR>
1023 &nbsp;
1024 <BR>
1025 &nbsp;&nbsp;int&nbsp;make_mprofile&nbsp;(const&nbsp;char&nbsp;*ior,&nbsp;
1026 <BR>
1027 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_MProfile&nbsp;&amp;mprofile,&nbsp;
1028 <BR>
1029 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CORBA::Environment&nbsp;&amp;ACE_TRY_ENV);&nbsp;
1030 <BR>
1031 &nbsp;&nbsp;//&nbsp;Parse&nbsp;a&nbsp;string&nbsp;containing&nbsp;a&nbsp;URL&nbsp;style&nbsp;IOR&nbsp;and&nbsp;return&nbsp;an&nbsp;
1032 <BR>
1033 &nbsp;&nbsp;//&nbsp;MProfile.&nbsp;
1034 <BR>
1035 &nbsp;
1036 <BR>
1037 &nbsp;&nbsp;virtual&nbsp;int&nbsp;open&nbsp;(TAO_ORB_Core&nbsp;*orb_core)&nbsp;=&nbsp;0;&nbsp;
1038 <BR>
1039 &nbsp;&nbsp;//&nbsp;&nbsp;Initialize&nbsp;object&nbsp;and&nbsp;register&nbsp;with&nbsp;reactor.&nbsp;
1040 <BR>
1041 &nbsp;
1042 <BR>
1043 &nbsp;&nbsp;virtual&nbsp;int&nbsp;close&nbsp;(void)&nbsp;=&nbsp;0;&nbsp;
1044 <BR>
1045 &nbsp;&nbsp;//&nbsp;Shutdown&nbsp;Connector&nbsp;bridge&nbsp;and&nbsp;concreate&nbsp;Connector.&nbsp;
1046 <BR>
1047 &nbsp;
1048 <BR>
1049 &nbsp;&nbsp;virtual&nbsp;int&nbsp;connect&nbsp;(TAO_Profile&nbsp;*profile,&nbsp;
1050 <BR>
1051 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_Transport&nbsp;*&amp;,&nbsp;
1052 <BR>
1053 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_Time_Value&nbsp;*max_wait_time)&nbsp;=&nbsp;0;&nbsp;
1054 <BR>
1055 &nbsp;&nbsp;//&nbsp;To&nbsp;support&nbsp;pluggable&nbsp;we&nbsp;need&nbsp;to&nbsp;abstract&nbsp;away&nbsp;the&nbsp;connect()&nbsp;
1056 <BR>
1057 &nbsp;&nbsp;//&nbsp;method&nbsp;so&nbsp;it&nbsp;can&nbsp;be&nbsp;called&nbsp;from&nbsp;the&nbsp;GIOP&nbsp;code&nbsp;independent&nbsp;of&nbsp;the&nbsp;
1058 <BR>
1059 &nbsp;&nbsp;//&nbsp;actual&nbsp;transport&nbsp;protocol&nbsp;in&nbsp;use.&nbsp;
1060 <BR>
1061 &nbsp;
1062 <BR>
1063 &nbsp;&nbsp;virtual&nbsp;int&nbsp;preconnect&nbsp;(const&nbsp;char&nbsp;*preconnections)&nbsp;=&nbsp;0;&nbsp;
1064 <BR>
1065 &nbsp;&nbsp;//&nbsp;Initial&nbsp;set&nbsp;of&nbsp;connections&nbsp;to&nbsp;be&nbsp;established.&nbsp;
1066 <BR>
1067 &nbsp;
1068 <BR>
1069 &nbsp;&nbsp;virtual&nbsp;TAO_Profile&nbsp;*create_profile&nbsp;(TAO_InputCDR&amp;&nbsp;cdr)&nbsp;=&nbsp;0;&nbsp;
1070 <BR>
1071 &nbsp;&nbsp;//&nbsp;Create&nbsp;a&nbsp;profile&nbsp;for&nbsp;this&nbsp;protocol&nbsp;and&nbsp;initialize&nbsp;it&nbsp;based&nbsp;on&nbsp;the&nbsp;
1072 <BR>
1073 &nbsp;&nbsp;//&nbsp;encapsulation&nbsp;in&nbsp;&lt;cdr&gt;&nbsp;
1074 <BR>
1075 &nbsp;
1076 <BR>
1077 &nbsp;&nbsp;virtual&nbsp;int&nbsp;check_prefix&nbsp;(const&nbsp;char&nbsp;*endpoint)&nbsp;=&nbsp;0;&nbsp;
1078 <BR>
1079 &nbsp;&nbsp;//&nbsp;Check&nbsp;that&nbsp;the&nbsp;prefix&nbsp;of&nbsp;the&nbsp;provided&nbsp;endpoint&nbsp;is&nbsp;valid&nbsp;for&nbsp;use&nbsp;
1080 <BR>
1081 &nbsp;&nbsp;//&nbsp;with&nbsp;a&nbsp;given&nbsp;pluggable&nbsp;protocol.&nbsp;
1082 <BR>
1083 &nbsp;
1084 <BR>
1085 &nbsp;&nbsp;virtual&nbsp;char&nbsp;object_key_delimiter&nbsp;(void)&nbsp;const&nbsp;=&nbsp;0;&nbsp;
1086 <BR>
1087 &nbsp;&nbsp;//&nbsp;Return&nbsp;the&nbsp;object&nbsp;key&nbsp;delimiter&nbsp;to&nbsp;use&nbsp;or&nbsp;expect.&nbsp;
1088 <BR>
1089 &nbsp;
1090 <BR>
1091 #if&nbsp;defined&nbsp;(TAO_USES_ROBUST_CONNECTION_MGMT)&nbsp;
1092 <BR>
1093 &nbsp;&nbsp;virtual&nbsp;int&nbsp;purge_connections&nbsp;(void)&nbsp;=&nbsp;0;&nbsp;
1094 <BR>
1095 &nbsp;&nbsp;//&nbsp;Purge&nbsp;&#34;old&#34;&nbsp;connections.&nbsp;
1096 <BR>
1097 #endif&nbsp;/*&nbsp;TAO_USES_ROBUST_CONNECTION_MGMT&nbsp;*/&nbsp;
1098 <BR>
1099 &nbsp;
1100 <BR>
1101 protected:&nbsp;
1102 <BR>
1103 &nbsp;&nbsp;virtual&nbsp;void&nbsp;make_profile&nbsp;(const&nbsp;char&nbsp;*endpoint,&nbsp;
1104 <BR>
1105 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_Profile&nbsp;*&amp;,&nbsp;
1106 <BR>
1107 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CORBA::Environment&nbsp;&amp;ACE_TRY_ENV)&nbsp;=&nbsp;0;&nbsp;
1108 <BR>
1109 &nbsp;&nbsp;//&nbsp;Create&nbsp;a&nbsp;profile&nbsp;with&nbsp;a&nbsp;given&nbsp;endpoint.&nbsp;
1110 <BR>
1111 &nbsp;
1112 <BR>
1113 private:&nbsp;
1114 <BR>
1115 &nbsp;&nbsp;CORBA::ULong&nbsp;tag_;&nbsp;
1116 <BR>
1117 &nbsp;&nbsp;//&nbsp;IOP&nbsp;protocol&nbsp;tag.&nbsp;
1118 <BR>
1119 };</DD>
1120 </DL>A description of each of the methods that must be implemented follows:
1124 <DL>
1125 <DT><STRONG>The&nbsp;Constructor.</STRONG></DT>
1126 <DD>As with the <TT>Acceptor</TT> constructor, the <TT>TAO_Connector</TT>
1127 base class should be initialized with the tag associated with the pluggable
1128 protocol in question. Here is TAO's IIOP pluggable protocol <TT>Connector</TT>
1129 constructor:
1132 <DL COMPACT>
1133 <DT>
1134 <DD>TAO_IIOP_Connector::TAO_IIOP_Connector&nbsp;(void)&nbsp;
1135 <BR>
1136 &nbsp;&nbsp;:&nbsp;TAO_Connector&nbsp;(TAO_TAG_IIOP_PROFILE),&nbsp;
1137 <BR>
1138 &nbsp;&nbsp;&nbsp;&nbsp;orb_core_&nbsp;(0),&nbsp;
1139 <BR>
1140 &nbsp;&nbsp;&nbsp;&nbsp;base_connector_&nbsp;()&nbsp;
1141 <BR>
1142 {&nbsp;
1143 <BR>
1144 }</DD>
1145 </DL></DD>
1147 <DT><STRONG><TT>open</TT>.</STRONG></DT>
1148 <DD>The <TT>open</TT> method simply opens the underlying connector.
1149 This is typically an <TT>ACE_Strategy_Connector</TT> template instance. For
1150 example, TAO's IIOP pluggable protocol uses an
1154 <DL COMPACT>
1155 <DT>
1156 <DD>ACE_Strategy_Connector&lt;TAO_IIOP_Client_Connection_Handler,&nbsp;
1157 <BR>
1158 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_SOCK_CONNECTOR&gt;</DD>
1159 </DL>as its underlying connection strategy. No connection establishment occurs here.
1160 Note that, if ACE is used to implement a <TT>Connector</TT>, this method should
1161 also register the <TT>Connection Handler</TT> with an <TT>ACE_Reactor</TT>.
1164 </DD>
1165 <DT><STRONG><TT>close</TT>.</STRONG></DT>
1166 <DD><TT>close</TT> simply closes the underlying <TT>Connector</TT>
1167 bridge and the concrete <TT>Connector</TT>.</DD>
1169 <DT><STRONG><TT>connect</TT>.</STRONG></DT>
1170 <DD>The <TT>connect</TT> method actively establishes a connection
1171 to the endpoint encoded within the IOR in use. It should first verify that the
1172 tag contained within <TT>Profile</TT> passed to it matches the tag associated
1173 with the pluggable protocol. If the tags do not match then an attempt use a
1174 <TT>Profile</TT> for another pluggable protocol was made.
1177 The <TT>Transport</TT> object must also be set in this method. This is generally
1178 done by using the <TT>transport</TT> method found within the <TT>Connection
1179 Handler</TT> being used.
1182 </DD>
1183 <DT><STRONG><TT>preconnect</TT>.</STRONG></DT>
1184 <DD>The <TT>preconnect</TT> method is invoked when the <TT><A HREF="../Options.html#-ORBPreconnect">-ORBPreconnect</A></TT>
1185 ORB option is used. It causes a blocking connection to be made to the specified
1186 address. Multiple connections can be made to the same endpoint. For example,
1187 the following <TT>-ORBPreconnect</TT> option will cause two IIOP blocking connections
1188 to be made to the specified host and port:
1192 <DL COMPACT>
1193 <DT>
1194 <DD>-ORBPreconnect&nbsp;iiop://foo.bar.com:1234,foo.bar.com:1234</DD>
1195 </DL>
1197 Much of the preconnect parsing code in TAO's current <TT>preconnect</TT> implementations
1198 will be factored out into a common method. Pluggable protocols will still be
1199 responsible for parsing addresses, just like the <TT>open</TT> method in <TT>Acceptor</TT>s
1200 (not <TT>Connector</TT>s).
1203 </DD>
1204 <DT><STRONG><TT>check_prefix</TT>.</STRONG></DT>
1205 <DD><TT>check_prefix</TT> checks that the protocol prefix
1206 in a URL style IOR or preconnect endpoint is valid for use with a given pluggable
1207 protocol. For example, the <TT>check_prefix</TT> implementation in TAO's IIOP
1208 pluggable protocol looks like the following:
1212 <DL COMPACT>
1213 <DT>
1214 <DD>int&nbsp;
1215 <BR>
1216 TAO_IIOP_Connector::check_prefix&nbsp;(const&nbsp;char&nbsp;*endpoint)&nbsp;
1217 <BR>
1218 {&nbsp;
1219 <BR>
1220 &nbsp;&nbsp;//&nbsp;Check&nbsp;for&nbsp;a&nbsp;valid&nbsp;string&nbsp;
1221 <BR>
1222 &nbsp;&nbsp;if&nbsp;(!endpoint&nbsp;||&nbsp;!*endpoint)&nbsp;
1223 <BR>
1224 &nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;-1;&nbsp;&nbsp;//&nbsp;Failure&nbsp;
1225 <BR>
1226 &nbsp;
1227 <BR>
1228 &nbsp;&nbsp;const&nbsp;char&nbsp;*protocol[]&nbsp;=&nbsp;{&nbsp;&#34;iiop&#34;,&nbsp;&#34;iioploc&#34;&nbsp;};&nbsp;
1229 <BR>
1230 &nbsp;
1231 <BR>
1232 &nbsp;&nbsp;size_t&nbsp;slot&nbsp;=&nbsp;ACE_OS::strchr&nbsp;(endpoint,&nbsp;':')&nbsp;-&nbsp;endpoint;&nbsp;
1233 <BR>
1234 &nbsp;
1235 <BR>
1236 &nbsp;&nbsp;size_t&nbsp;len0&nbsp;=&nbsp;ACE_OS::strlen&nbsp;(protocol[0]);&nbsp;
1237 <BR>
1238 &nbsp;&nbsp;size_t&nbsp;len1&nbsp;=&nbsp;ACE_OS::strlen&nbsp;(protocol[1]);&nbsp;
1239 <BR>
1240 &nbsp;
1241 <BR>
1242 &nbsp;&nbsp;//&nbsp;Check&nbsp;for&nbsp;the&nbsp;proper&nbsp;prefix&nbsp;in&nbsp;the&nbsp;IOR.&nbsp;&nbsp;If&nbsp;the&nbsp;proper&nbsp;prefix&nbsp;
1243 <BR>
1244 &nbsp;&nbsp;//&nbsp;isn't&nbsp;in&nbsp;the&nbsp;IOR&nbsp;then&nbsp;it&nbsp;is&nbsp;not&nbsp;an&nbsp;IOR&nbsp;we&nbsp;can&nbsp;use.&nbsp;
1245 <BR>
1246 &nbsp;&nbsp;if&nbsp;(slot&nbsp;==&nbsp;len0&nbsp;
1247 <BR>
1248 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp;&nbsp;ACE_OS::strncasecmp&nbsp;(endpoint,&nbsp;protocol[0],&nbsp;len0)&nbsp;==&nbsp;0)&nbsp;
1249 <BR>
1250 &nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;0;&nbsp;
1251 <BR>
1252 &nbsp;&nbsp;else&nbsp;if&nbsp;(slot&nbsp;==&nbsp;len1&nbsp;
1253 <BR>
1254 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp;&nbsp;ACE_OS::strncasecmp&nbsp;(endpoint,&nbsp;protocol[1],&nbsp;len1)&nbsp;==&nbsp;0)&nbsp;
1255 <BR>
1256 &nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;0;&nbsp;
1257 <BR>
1258 &nbsp;
1259 <BR>
1260 &nbsp;&nbsp;return&nbsp;-1;&nbsp;
1261 <BR>
1262 &nbsp;&nbsp;//&nbsp;Failure:&nbsp;not&nbsp;an&nbsp;IIOP&nbsp;IOR&nbsp;
1263 <BR>
1264 &nbsp;&nbsp;//&nbsp;DO&nbsp;NOT&nbsp;throw&nbsp;an&nbsp;exception&nbsp;here.&nbsp;
1265 <BR>
1266 }</DD>
1267 </DL>
1269 It checks that the protocol prefix in a URL style IOR (e.g. <TT>corbaloc:iiop:foo.bar.com:1234/...</TT>)
1270 or preconnect endpoint matches the one(s) supported by the IIOP pluggable protocol,
1271 in this case ``<TT>iiop</TT>'' and ``<TT>iioploc</TT>.'' If no match occurs
1272 then return an error condition (<TT>-1</TT>). Note that the protocol prefix
1273 ``<TT>iiop</TT>'' is only there for backward compatibility. It may be removed
1274 in future TAO releases.
1277 This method is important for TAO's implementation of the CORBA Interoperable
1278 Naming Service.
1281 </DD>
1282 <DT><STRONG><TT>object_key_delimiter</TT>.</STRONG></DT>
1283 <DD>The object key delimiter within a URL style
1284 IOR is the character that separates the address from the object key. For example,
1285 in the following IIOP URL style IOR:
1289 <DL COMPACT>
1290 <DT>
1291 <DD>corbaloc:iiop:1.1@foo.bar.com:1234/some_object_key</DD>
1292 </DL>
1294 the object key delimiter is `<TT>/</TT>.' However, this character is not suitable
1295 for all pluggable protocols, such as TAO's UIOP pluggable protocol, because
1296 addresses within a URL style IOR may contain that very same character. A typical
1297 TAO UIOP URL style IOR may look something like:
1301 <DL COMPACT>
1302 <DT>
1303 <DD>uioploc:///tmp/foobar|some_other_object_key</DD>
1304 </DL>
1306 In this case, the object key delimiter is a vertical bar `<TT>|</TT>' because
1307 using the same object key delimiter that IIOP uses `<TT>/</TT>' would cause
1308 the point where the UIOP rendezvous point ``<TT>/tmp/foobar</TT>'' ends and
1309 where the object key ``<TT>some_other_object_key</TT>'' begins to be ambiguous.
1310 For instance, if an IIOP object key delimiter was used in a UIOP URL style IOR
1311 as follows:
1315 <DL COMPACT>
1316 <DT>
1317 <DD>uioploc:///tmp/foobar/some_other_object_key</DD>
1318 </DL>
1320 it then becomes impossible to tell if the rendezvous point is ``<TT>/tmp</TT>''
1321 or ``<TT>/tmp/foobar</TT>,'' and similarly for the object key, hence the need
1322 for an object key delimiter other than `<TT>/</TT>.'
1325 In general, this method simply returns a static variable in the associated <TT>Profile</TT>
1326 that contains the object key delimiter appropriate for the given pluggable protocol.
1329 </DD>
1330 <DT><STRONG><TT>create_profile</TT>.</STRONG></DT>
1331 <DD>This method creates and initializes a profile using
1332 the provided CDR stream. Most of this code is also ``boilerplate.'' As such,
1333 it may be factored out in future TAO releases.</DD>
1335 <DT><STRONG><TT>make_profile</TT>.</STRONG></DT>
1336 <DD><TT>make_profile</TT> is another method that can essentially
1337 be ``cut and pasted'' from existing TAO pluggable protocols. It is simply
1338 a <TT>Profile</TT> factory. The <TT>Profile</TT> it creates is initialized with
1339 an object reference of the form:
1343 <DL COMPACT>
1344 <DT>
1345 <DD>N.n@address/object_key</DD>
1346 </DL>
1350 <DL COMPACT>
1351 <DT>
1352 <DD>address/object_key</DD>
1353 </DL>
1355 where ``<TT>N.n</TT>'' are the major and minor protocol versions, respectively,
1356 and the `<TT>/</TT>' is the protocol-specific object key delimiter.
1358 <P></DD>
1359 </DL>
1363 <H3><A NAME="SECTION230" HREF="#TOC_SECTION230">
1364 The <TT>Profile</TT> Object</A>
1365 </H3>
1368 TAO <TT>Profile</TT> objects encapsulate all of the methods and members necessary
1369 to create and parse a protocol-specific IOR, in addition to representing object
1370 address and location information. TAO <TT>Profile</TT>s are based on CORBA IOR
1371 definitions.
1374 All protocol-specific <TT>Profile</TT> implementations should inherit from the
1375 <TT>TAO_Profile</TT> abstract base class. The <TT>TAO_Profile</TT> interface
1376 is declared in the file
1377 <TT>&lt;<A HREF="../../tao/Profile.h">tao/Profile.h&gt;</A></TT>.
1378 Its interface follows. Only the methods that must be implemented are shown:
1383 <DL COMPACT>
1384 <DT>
1385 <DD>class&nbsp;TAO_Export&nbsp;TAO_Profile&nbsp;
1386 <BR>
1387 {&nbsp;
1388 <BR>
1389 &nbsp;&nbsp;//&nbsp;=&nbsp;TITLE&nbsp;
1390 <BR>
1391 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;Defines&nbsp;the&nbsp;Profile&nbsp;interface&nbsp;
1392 <BR>
1393 &nbsp;&nbsp;//&nbsp;
1394 <BR>
1395 &nbsp;&nbsp;//&nbsp;=&nbsp;DESCRIPTION&nbsp;
1396 <BR>
1397 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;An&nbsp;abstract&nbsp;base&nbsp;class&nbsp;for&nbsp;representing&nbsp;object&nbsp;address&nbsp;or&nbsp;location&nbsp;
1398 <BR>
1399 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;information.&nbsp;&nbsp;This&nbsp;is&nbsp;based&nbsp;on&nbsp;the&nbsp;CORBA&nbsp;IOR&nbsp;definitions.&nbsp;
1400 <BR>
1401 &nbsp;&nbsp;//&nbsp;
1402 <BR>
1403 public:&nbsp;
1404 <BR>
1405 &nbsp;
1406 <BR>
1407 &nbsp;&nbsp;virtual&nbsp;int&nbsp;parse_string&nbsp;(const&nbsp;char&nbsp;*string,&nbsp;
1408 <BR>
1409 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CORBA::Environment&nbsp;&amp;ACE_TRY_ENV)&nbsp;=&nbsp;0;&nbsp;
1410 <BR>
1411 &nbsp;&nbsp;//&nbsp;Initialize&nbsp;this&nbsp;object&nbsp;using&nbsp;the&nbsp;given&nbsp;input&nbsp;string.&nbsp;
1412 <BR>
1413 &nbsp;&nbsp;//&nbsp;Supports&nbsp;URL&nbsp;style&nbsp;of&nbsp;object&nbsp;references&nbsp;
1414 <BR>
1415 &nbsp;
1416 <BR>
1417 &nbsp;&nbsp;virtual&nbsp;char*&nbsp;to_string&nbsp;(CORBA::Environment&nbsp;&amp;ACE_TRY_ENV)&nbsp;=&nbsp;0;&nbsp;
1418 <BR>
1419 &nbsp;&nbsp;//&nbsp;Return&nbsp;a&nbsp;string&nbsp;representation&nbsp;for&nbsp;this&nbsp;profile.&nbsp;&nbsp;client&nbsp;must&nbsp;
1420 <BR>
1421 &nbsp;&nbsp;//&nbsp;deallocate&nbsp;memory.&nbsp;
1422 <BR>
1423 &nbsp;
1424 <BR>
1425 &nbsp;&nbsp;virtual&nbsp;int&nbsp;decode&nbsp;(TAO_InputCDR&amp;&nbsp;cdr)&nbsp;=&nbsp;0;&nbsp;
1426 <BR>
1427 &nbsp;&nbsp;//&nbsp;Initialize&nbsp;this&nbsp;object&nbsp;using&nbsp;the&nbsp;given&nbsp;CDR&nbsp;octet&nbsp;string.&nbsp;
1428 <BR>
1429 &nbsp;
1430 <BR>
1431 &nbsp;&nbsp;virtual&nbsp;int&nbsp;encode&nbsp;(TAO_OutputCDR&nbsp;&amp;stream)&nbsp;const&nbsp;=&nbsp;0;&nbsp;
1432 <BR>
1433 &nbsp;&nbsp;//&nbsp;Encode&nbsp;this&nbsp;profile&nbsp;in&nbsp;a&nbsp;stream,&nbsp;i.e.&nbsp;marshal&nbsp;it.&nbsp;
1434 <BR>
1435 &nbsp;
1436 <BR>
1437 &nbsp;&nbsp;virtual&nbsp;TAO_ObjectKey&nbsp;*_key&nbsp;(void)&nbsp;const&nbsp;=&nbsp;0;&nbsp;
1438 <BR>
1439 &nbsp;&nbsp;//&nbsp;Obtain&nbsp;the&nbsp;object&nbsp;key,&nbsp;return&nbsp;0&nbsp;if&nbsp;the&nbsp;profile&nbsp;cannot&nbsp;be&nbsp;parsed.&nbsp;
1440 <BR>
1441 &nbsp;&nbsp;//&nbsp;The&nbsp;memory&nbsp;is&nbsp;owned&nbsp;by&nbsp;the&nbsp;caller!&nbsp;
1442 <BR>
1443 &nbsp;
1444 <BR>
1445 &nbsp;&nbsp;virtual&nbsp;CORBA::Boolean&nbsp;is_equivalent&nbsp;(const&nbsp;TAO_Profile*&nbsp;other_profile)&nbsp;=&nbsp;0;&nbsp;
1446 <BR>
1447 &nbsp;&nbsp;//&nbsp;Return&nbsp;true&nbsp;if&nbsp;this&nbsp;profile&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;other_profile.&nbsp;&nbsp;Two&nbsp;
1448 <BR>
1449 &nbsp;&nbsp;//&nbsp;profiles&nbsp;are&nbsp;equivalent&nbsp;iff&nbsp;their&nbsp;key,&nbsp;port,&nbsp;host,&nbsp;object_key&nbsp;and&nbsp;
1450 <BR>
1451 &nbsp;&nbsp;//&nbsp;version&nbsp;are&nbsp;the&nbsp;same.&nbsp;
1452 <BR>
1453 &nbsp;
1454 <BR>
1455 &nbsp;&nbsp;virtual&nbsp;CORBA::ULong&nbsp;hash&nbsp;(CORBA::ULong&nbsp;max,&nbsp;
1456 <BR>
1457 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CORBA::Environment&nbsp;&amp;ACE_TRY_ENV)&nbsp;=&nbsp;0;&nbsp;
1458 <BR>
1459 &nbsp;&nbsp;//&nbsp;Return&nbsp;a&nbsp;hash&nbsp;value&nbsp;for&nbsp;this&nbsp;object.&nbsp;
1460 <BR>
1461 &nbsp;
1462 <BR>
1463 &nbsp;&nbsp;virtual&nbsp;int&nbsp;addr_to_string&nbsp;(char&nbsp;*buffer,&nbsp;size_t&nbsp;length)&nbsp;=&nbsp;0;&nbsp;
1464 <BR>
1465 &nbsp;&nbsp;//&nbsp;Return&nbsp;a&nbsp;string&nbsp;representation&nbsp;for&nbsp;the&nbsp;address.&nbsp;&nbsp;Returns&nbsp;
1466 <BR>
1467 &nbsp;&nbsp;//&nbsp;-1&nbsp;if&nbsp;buffer&nbsp;is&nbsp;too&nbsp;small.&nbsp;&nbsp;The&nbsp;purpose&nbsp;of&nbsp;this&nbsp;method&nbsp;is&nbsp;to&nbsp;
1468 <BR>
1469 &nbsp;&nbsp;//&nbsp;provide&nbsp;a&nbsp;general&nbsp;interface&nbsp;to&nbsp;the&nbsp;underlying&nbsp;address&nbsp;object's&nbsp;
1470 <BR>
1471 &nbsp;&nbsp;//&nbsp;addr_to_string&nbsp;method.&nbsp;&nbsp;This&nbsp;allowsthe&nbsp;protocol&nbsp;implementor&nbsp;to&nbsp;
1472 <BR>
1473 &nbsp;&nbsp;//&nbsp;select&nbsp;the&nbsp;appropriate&nbsp;string&nbsp;format.&nbsp;
1474 <BR>
1475 &nbsp;
1476 <BR>
1477 &nbsp;&nbsp;virtual&nbsp;void&nbsp;reset_hint&nbsp;(void)&nbsp;=&nbsp;0;&nbsp;
1478 <BR>
1479 &nbsp;&nbsp;//&nbsp;This&nbsp;method&nbsp;is&nbsp;used&nbsp;with&nbsp;a&nbsp;connection&nbsp;has&nbsp;been&nbsp;reset&nbsp;requiring&nbsp;
1480 <BR>
1481 &nbsp;&nbsp;//&nbsp;the&nbsp;hint&nbsp;to&nbsp;be&nbsp;cleaned&nbsp;up&nbsp;and&nbsp;reset&nbsp;to&nbsp;NULL.&nbsp;
1482 <BR>
1483 };</DD>
1484 </DL>TAO's existing pluggable protocols have a static member containing the object
1485 key delimiter specific to the given pluggable protocol, in addition to a static
1486 protocol prefix accessor method that simply returns a pointer to a static string
1487 containing the protocol prefix specific to the pluggable protocol. Note that
1488 both of these members will always remain constant so there is no problem in
1489 making them static.
1492 Theses static member are:
1496 <DL>
1497 <DT><STRONG><TT>object_key_delimiter</TT>.</STRONG></DT>
1498 <DD>This <I>variable</I> contains the object key
1499 delimiter specific to the given pluggable protocol. A typical definition looks
1500 like:
1503 <DL COMPACT>
1504 <DT>
1505 <DD>const&nbsp;char&nbsp;TAO_IIOP_Profile::object_key_delimiter&nbsp;=&nbsp;'/';</DD>
1506 </DL></DD>
1507 <DT><STRONG><TT>prefix</TT>.</STRONG></DT>
1508 <DD>This <I>method</I> simply returns a pointer to a static string
1509 that contains the protocol prefix specific to the pluggable protocol in use.
1510 The static string for the IIOP pluggable protocol is:
1514 <DL COMPACT>
1515 <DT>
1516 <DD>static&nbsp;const&nbsp;char&nbsp;prefix_[]&nbsp;=&nbsp;&#34;iiop&#34;;</DD>
1517 </DL>
1519 The IIOP <TT>prefix</TT> method is:
1523 <DL COMPACT>
1524 <DT>
1525 <DD>const&nbsp;char&nbsp;*&nbsp;
1526 <BR>
1527 TAO_IIOP_Profile::prefix&nbsp;(void)&nbsp;
1528 <BR>
1529 {&nbsp;
1530 <BR>
1531 &nbsp;&nbsp;return&nbsp;::prefix_;&nbsp;
1532 <BR>
1533 }</DD>
1534 </DL></DD>
1535 </DL>
1536 Note that it not strictly necessary to implement equivalent versions of these
1537 static members. TAO's implementation just happens to use them. However, pluggable
1538 protocol implementations that are based on TAO's pluggable protocols may need
1539 them.
1542 Common to all concrete <TT>Profile</TT> implementations are a set of methods
1543 that must be implemented. A description of each of these methods:
1547 <DL>
1548 <DT><STRONG>The&nbsp;Constructors.</STRONG></DT>
1549 <DD>TAO's existing pluggable protocols each implement several
1550 constructors in their concrete <TT>Profile</TT> classes. While pluggable protocols
1551 are not strictly required to implement analogs to all of the constructors in
1552 existing TAO pluggable protocols, it is generally a good idea to do so. All
1553 of the constructors should initialize the <TT>TAO_Profile</TT> abstract base
1554 class with the tag associated with the pluggable protocol. The object key should
1555 also be set during <TT>Profile</TT> construction.</DD>
1557 <DT><STRONG><TT>parse_string</TT>.</STRONG></DT>
1558 <DD><TT>parse_string</TT> initialize a <TT>Profile</TT>
1559 object using the provided string. The string passed to this method has the format:
1562 <DL COMPACT>
1563 <DT>
1564 <DD>N.n@address/object_key</DD>
1565 </DL>
1571 <DL COMPACT>
1572 <DT>
1573 <DD>address/object_key</DD>
1574 </DL>
1575 <P>where the <TT>address</TT> and the object key delimiter `<TT>/</TT>' are pluggable
1576 protocol specific. The <TT>parse_string</TT> method must be able to extract
1577 the protocol version (even if it isn't used), the address and the object key
1578 from the provided string. It is generally a good idea to use the <TT>parse_string</TT>
1579 methods in TAO's existing pluggable protocols as a reference when implementing
1580 this method.
1583 </DD>
1584 <DT><STRONG><TT>to_string</TT>.</STRONG></DT>
1585 <DD>This method returns the URL style representation of the
1586 object reference encapsulated by the <TT>Profile</TT> object. Most of this code
1587 is also ``boilerplate.'' However, the address part of the URL style IOR, returned
1588 by this method should be specific to the pluggable protocol. For example, the
1589 address in the following IIOP URL style IOR:
1593 <DL COMPACT>
1594 <DT>
1595 <DD>corbaloc:iiop:1.1@foo.bar.com:1234/yet_another_object_key</DD>
1596 </DL>
1597 <P>is ``<TT>foo.bar.com:1234</TT>.'' Much of the in TAO's existing pluggable
1598 protocols may also be factored out because that code is common to all pluggable
1599 protocols. The URL style IOR created by this method should be usable
1600 by TAO's <A HREF="../INS.html">Interoperable Naming Service</A> via the
1601 <TT><A HREF="../Options.html#-ORBInitRef">-ORBInitRef</A></TT> ORB option.
1604 </DD>
1605 <DT><STRONG><TT>decode</TT>.</STRONG></DT>
1606 <DD>The input CDR stream reference passed to this method is used
1607 to initialize the <TT>Profile</TT> object, by extracting (<I>decoding</I> all
1608 object reference information found within the CDR stream. Care must be taken
1609 to extract the information in the correct order. Use existing TAO pluggable
1610 protocol <TT>decode</TT> implementations as a reference.
1613 The <TT>decode</TT> method performs the inverse operation of the <TT>encode</TT>
1614 method.
1617 </DD>
1618 <DT><STRONG><TT>encode</TT>.</STRONG></DT>
1619 <DD>This method inserts (<I>encodes</I> all of the information
1620 encapsulated by the <TT>Profile</TT> object in to the provided output CDR stream.
1621 Care must be taken to insert the information in the correct order. Use existing
1622 TAO pluggable protocol <TT>encode</TT> implementations as a reference.
1625 The <TT>encode</TT> method performs the inverse operation of the <TT>decode</TT>
1626 method.
1629 </DD>
1630 <DT><STRONG><TT>_key</TT>.</STRONG></DT>
1631 <DD>The <TT>_key</TT> method constructs a <TT>TAO_ObjectKey</TT>
1632 object that is a <I>copy</I> of the object key found within the <TT>Profile</TT>
1633 object, and returns a pointer to the newly create <TT>TAO_ObjectKey</TT> object.
1634 Note that the <I>caller</I> owns the memory allocated by this method. TAO's
1635 IIOP <TT>_key</TT> implementation is:
1639 <DL COMPACT>
1640 <DT>
1641 <DD>ACE_INLINE&nbsp;TAO_ObjectKey&nbsp;*&nbsp;
1642 <BR>
1643 TAO_IIOP_Profile::_key&nbsp;(void)&nbsp;const&nbsp;
1644 <BR>
1645 {&nbsp;
1646 <BR>
1647 &nbsp;&nbsp;TAO_ObjectKey&nbsp;*key&nbsp;=&nbsp;0;&nbsp;
1648 <BR>
1649 &nbsp;
1650 <BR>
1651 &nbsp;&nbsp;ACE_NEW_RETURN&nbsp;(key,&nbsp;
1652 <BR>
1653 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_ObjectKey&nbsp;(this-&gt;object_key_),&nbsp;
1654 <BR>
1655 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0);&nbsp;
1656 <BR>
1657 &nbsp;
1658 <BR>
1659 &nbsp;&nbsp;return&nbsp;key;&nbsp;
1660 <BR>
1661 }</DD>
1662 </DL></DD>
1664 <DT><STRONG><TT>is_equivalent</TT>.</STRONG></DT>
1665 <DD>The <TT>is_equivalent</TT> method implements the
1666 CORBA specified method of the same name. It should return true if this profile
1667 is equivalent to the profile to which it is being compared. Two profiles are
1668 equivalent <I>if and only if</I> their tag, version, address and object key
1669 are the same.</DD>
1671 <DT><STRONG><TT>hash</TT>.</STRONG></DT>
1672 <DD>The <TT>hash</TT> method implements the CORBA specified method
1673 of the same name. It is expected to return 32 bit <TT>unsigned integer</TT>
1674 (<TT>CORBA::ULong</TT>) that uniquely identifies the CORBA object referenced
1675 by the <TT>Profile</TT> object. This method accepts an argument that specifies
1676 the largest value the hash can be.
1679 Any algorithm deemed suitable to provide the required functionality may be used.
1680 The <TT>ACE</TT> class in the ACE library provides implementations of several
1681 hash algorithms.
1684 </DD>
1685 <DT><STRONG><TT>addr_to_string</TT>.</STRONG></DT>
1686 <DD><TT>addr_to_string</TT> returns a string representation
1687 of the address. It should return <TT>-1</TT> if the supplied buffer is too small.
1688 The stringified address should have the same form that the address in the URL
1689 style IOR has. This method should be reentrant.</DD>
1691 <DT><STRONG><TT>reset_hint</TT>.</STRONG></DT>
1692 <DD>The <TT>reset_hint</TT> method resets the pointer to
1693 a successfully used <TT>Connection Handler</TT>. If no pointer to such a <TT>Connection
1694 Handler</TT>, i.e. a <I>hint</I> is provided by the pluggable protocol then this
1695 method may be implemented as a ``no-op.'' A pluggable protcol that does not
1696 provide a cached <TT>Connection Handler</TT> will not be able to take advantage
1697 of improved <TT>Connector</TT> table look up times.</DD>
1698 </DL>
1702 <H3><A NAME="SECTION240" HREF="#TOC_SECTION240">
1703 The <TT>Protocol_Factory</TT> Object</A>
1704 </H3>
1707 TAO's uses the ACE's Service Configurator implementation&nbsp;[<A
1708 HREF="#Schmidt:94k">3</A>]
1709 to dynamically load pluggable protocol factories. A <TT>Protocol_Factory</TT>
1710 is responsible for creating the <TT>Acceptor</TT> and <TT>Connector</TT> for
1711 the given pluggable protocol. TAO iterates through the list of loaded <TT>Protocol
1712 Factories</TT> and invokes a factory operation that creates the desired object:
1713 an <TT>Acceptor</TT> on the server-side, and a <TT>Connector</TT> on the client-side.
1716 All <TT>Protocol_Factory</TT> implementations should be derived from the <TT>TAO_Protocol_Factory</TT>
1717 abstract base class defined in
1718 <TT>&lt;<A HREF="../../tao/Protocol_Factory.h">tao/Protocol_Factory.h</A>&gt;</TT>.
1719 The <TT>TAO_Protocol_Factory</TT> interface is shown below:
1723 <DL COMPACT>
1724 <DT>
1725 <DD>class&nbsp;TAO_Export&nbsp;TAO_Protocol_Factory&nbsp;:&nbsp;public&nbsp;ACE_Service_Object&nbsp;
1726 <BR>
1727 {&nbsp;
1728 <BR>
1729 public:&nbsp;
1730 <BR>
1731 &nbsp;&nbsp;TAO_Protocol_Factory&nbsp;(void);&nbsp;
1732 <BR>
1733 &nbsp;&nbsp;virtual&nbsp;~TAO_Protocol_Factory&nbsp;(void);&nbsp;
1734 <BR>
1735 &nbsp;
1736 <BR>
1737 &nbsp;&nbsp;virtual&nbsp;int&nbsp;init&nbsp;(int&nbsp;argc,&nbsp;char&nbsp;*argv[]);&nbsp;
1738 <BR>
1739 &nbsp;&nbsp;//&nbsp;Initialization&nbsp;hook.&nbsp;
1740 <BR>
1741 &nbsp;
1742 <BR>
1743 &nbsp;&nbsp;virtual&nbsp;int&nbsp;match_prefix&nbsp;(const&nbsp;ACE_CString&nbsp;&amp;prefix);&nbsp;
1744 <BR>
1745 &nbsp;&nbsp;//&nbsp;Verify&nbsp;prefix&nbsp;is&nbsp;a&nbsp;match&nbsp;
1746 <BR>
1747 &nbsp;
1748 <BR>
1749 &nbsp;&nbsp;virtual&nbsp;const&nbsp;char&nbsp;*prefix&nbsp;(void)&nbsp;const;&nbsp;
1750 <BR>
1751 &nbsp;&nbsp;//&nbsp;Returns&nbsp;the&nbsp;prefix&nbsp;used&nbsp;by&nbsp;the&nbsp;protocol.&nbsp;
1752 <BR>
1753 &nbsp;
1754 <BR>
1755 &nbsp;&nbsp;virtual&nbsp;char&nbsp;options_delimiter&nbsp;(void)&nbsp;const;&nbsp;
1756 <BR>
1757 &nbsp;&nbsp;//&nbsp;Return&nbsp;the&nbsp;character&nbsp;used&nbsp;to&nbsp;mark&nbsp;where&nbsp;an&nbsp;endpoint&nbsp;ends&nbsp;and&nbsp;
1758 <BR>
1759 &nbsp;&nbsp;//&nbsp;where&nbsp;its&nbsp;options&nbsp;begin.&nbsp;
1760 <BR>
1761 &nbsp;
1762 <BR>
1763 &nbsp;&nbsp;//&nbsp;Factory&nbsp;methods&nbsp;
1764 <BR>
1765 &nbsp;&nbsp;virtual&nbsp;TAO_Acceptor&nbsp;&nbsp;*make_acceptor&nbsp;(void);&nbsp;
1766 <BR>
1767 &nbsp;&nbsp;//&nbsp;Create&nbsp;an&nbsp;acceptor&nbsp;
1768 <BR>
1769 &nbsp;
1770 <BR>
1771 &nbsp;&nbsp;virtual&nbsp;TAO_Connector&nbsp;*make_connector&nbsp;&nbsp;(void);&nbsp;
1772 <BR>
1773 &nbsp;&nbsp;//&nbsp;Create&nbsp;a&nbsp;connector&nbsp;
1774 <BR>
1775 &nbsp;
1776 <BR>
1777 &nbsp;&nbsp;virtual&nbsp;int&nbsp;requires_explicit_endpoint&nbsp;(void)&nbsp;const&nbsp;=&nbsp;0;&nbsp;
1778 <BR>
1779 &nbsp;&nbsp;//&nbsp;Some&nbsp;protocols&nbsp;should&nbsp;not&nbsp;create&nbsp;a&nbsp;default&nbsp;endpoint&nbsp;unless&nbsp;the&nbsp;
1780 <BR>
1781 &nbsp;&nbsp;//&nbsp;user&nbsp;specifies&nbsp;a&nbsp;-ORBEndpoint&nbsp;option.&nbsp;For&nbsp;example,&nbsp;local&nbsp;IPC&nbsp;
1782 <BR>
1783 &nbsp;&nbsp;//&nbsp;(aka&nbsp;UNIX&nbsp;domain&nbsp;sockets)&nbsp;is&nbsp;unable&nbsp;to&nbsp;remove&nbsp;the&nbsp;rendesvouz&nbsp;
1784 <BR>
1785 &nbsp;&nbsp;//&nbsp;point&nbsp;if&nbsp;the&nbsp;server&nbsp;crashes.&nbsp;&nbsp;For&nbsp;those&nbsp;protocols&nbsp;is&nbsp;better&nbsp;to&nbsp;
1786 <BR>
1787 &nbsp;&nbsp;//&nbsp;create&nbsp;the&nbsp;endpoint&nbsp;only&nbsp;if&nbsp;the&nbsp;user&nbsp;requests&nbsp;one.&nbsp;
1788 <BR>
1789 };</DD>
1790 </DL>Each of the important methods to be implemented are described below:
1794 <DL>
1795 <DT><STRONG><TT>init</TT>.</STRONG></DT>
1796 <DD>The <TT>init</TT> method is invoked immediately after the pluggable
1797 protocol factory is loaded. The <TT>Service Configurator</TT> passes <TT>Protocol
1798 Factory</TT> options specified in a <TT>Service Configurator</TT> configuration
1799 file (e.g. <TT>svc.conf</TT>) to this method. The passing convention is essentially
1800 the same as command line <TT>argc</TT>/<TT>argv</TT> argument passing convention.
1801 The only difference lies in the fact that the option parsing should begin at
1802 <TT>argv[0]</TT> instead of <TT>argv[1]</TT>. This differs from the
1803 standard command line passing convention where <TT>argv[0]</TT> is the
1804 name of the program currently being run. In any case, the <TT>init</TT> method
1805 allows protocol-specific options to be implemented. Once passed to this method,
1806 the pluggable protocol can use them to, for example, enable or disable certain
1807 features or flags within the <TT>Protocol Factory</TT>. Other pluggable protocol
1808 components can then use these flags or features as necessary.
1810 A typical <TT>Service Configurator</TT> file line that loads a pluggable protocol
1811 dynamically, and passes arguments to the <TT>init</TT> method would look like:
1815 <DL COMPACT>
1816 <DT>
1817 <DD>dynamic&nbsp;IIOP_Factory&nbsp;Service_Object&nbsp;*&nbsp;TAO:_make_TAO_IIOP_Protocol_Factory()&nbsp;&#34;-Foo&nbsp;Bar&#34;</DD>
1818 </DL>
1820 In the above example, the arguments ``<TT>-Foo</TT>'' and ``<TT>Bar</TT>''
1821 would be passed as <TT>argv[0]</TT> and <TT>argv[1]</TT>, respectively,
1822 to the <TT>Protocol_Factory init</TT> method.
1825 </DD>
1826 <DT><STRONG><TT>match_prefix</TT>.</STRONG></DT>
1827 <DD>This method verifies that protocol prefix contained
1828 in the string passed to matches the one used by the pluggable protocol. A typical
1829 implementation, such as the one used by the IIOP pluggable protocol, looks like:
1833 <DL COMPACT>
1834 <DT>
1835 <DD>static&nbsp;const&nbsp;char&nbsp;prefix_[]&nbsp;=&nbsp;&#34;iiop&#34;;&nbsp;
1836 <BR>
1837 &nbsp;
1838 <BR>
1839 int&nbsp;
1840 <BR>
1841 TAO_IIOP_Protocol_Factory::match_prefix&nbsp;(const&nbsp;ACE_CString&nbsp;&amp;prefix)&nbsp;
1842 <BR>
1843 {&nbsp;
1844 <BR>
1845 &nbsp;&nbsp;//&nbsp;Check&nbsp;for&nbsp;the&nbsp;proper&nbsp;prefix&nbsp;for&nbsp;this&nbsp;protocol.&nbsp;
1846 <BR>
1847 &nbsp;&nbsp;return&nbsp;(ACE_OS::strcasecmp&nbsp;(prefix.c_str&nbsp;(),&nbsp;::prefix_)&nbsp;==&nbsp;0);&nbsp;
1848 <BR>
1849 }</DD>
1850 </DL></DD>
1852 <DT><STRONG><TT>prefix</TT>.</STRONG></DT>
1853 <DD>The <TT>prefix</TT> method simply returns a pointer to the
1854 static string containing the protocol prefix used by the pluggable protocol.</DD>
1856 <DT><STRONG><TT>options_delimiter</TT>.</STRONG></DT>
1857 <DD>The <TT>options_delimiter</TT> method is similar
1858 to the <TT>object_key_delimiter</TT> method found in the <TT>Connector</TT>.
1859 However, it used to delimit where an endpoint ends and where its options begin.
1860 For example, the following <TT>-ORBEndpoint</TT> option specifies a endpoint-specific
1861 priority:
1865 <DL COMPACT>
1866 <DT>
1867 <DD>-ORBEndpoint&nbsp;iiop://1.1@foo.bar.com/priority=25</DD>
1868 </DL>
1870 To get around ambiguities in endpoints that can have a `<TT>/</TT>' character
1871 in them, the <TT>options_delimiter</TT> method can be used to determine what
1872 character to be used. For example, TAO's UIOP pluggable protocol implementation
1873 defines the following:
1877 <DL COMPACT>
1878 <DT>
1879 <DD>char&nbsp;
1880 <BR>
1881 TAO_UIOP_Protocol_Factory::options_delimiter&nbsp;(void)&nbsp;const&nbsp;
1882 <BR>
1883 {&nbsp;
1884 <BR>
1885 &nbsp;&nbsp;return&nbsp;'|';&nbsp;
1886 <BR>
1887 }</DD>
1888 </DL>
1890 An endpoint option for the UIOP pluggable protocol can look like the following:
1894 <DL COMPACT>
1895 <DT>
1896 <DD>-ORBEndpoint&nbsp;uiop://1.1@/tmp/foo|priority=25</DD>
1897 </DL>
1899 Notice that the `<TT>|</TT>' character is used to mark where the rendezvous
1900 point ends and where the endpoint-specific options begin.
1904 <TT>options_delimiter</TT> is a server-side related method. It is of no use
1905 to the client-side.
1908 </DD>
1909 <DT><STRONG><TT>make_acceptor</TT>.</STRONG></DT>
1910 <DD>The <TT>make_acceptor</TT> method is a factory method
1911 that returns a pointer to a dynamically allocated <TT>Acceptor</TT> specific
1912 to the pluggable protocol to which the <TT>Protocol_Factory</TT> object belongs.
1913 TAO's UIOP pluggable protocol implementation defines this method as follows:
1917 <DL COMPACT>
1918 <DT>
1919 <DD>TAO_Acceptor&nbsp;*&nbsp;
1920 <BR>
1921 TAO_UIOP_Protocol_Factory::make_acceptor&nbsp;(void)&nbsp;
1922 <BR>
1923 {&nbsp;
1924 <BR>
1925 &nbsp;&nbsp;TAO_Acceptor&nbsp;*acceptor&nbsp;=&nbsp;0;&nbsp;
1926 <BR>
1927 &nbsp;
1928 <BR>
1929 &nbsp;&nbsp;ACE_NEW_RETURN&nbsp;(acceptor,&nbsp;
1930 <BR>
1931 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_UIOP_Acceptor,&nbsp;
1932 <BR>
1933 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0);&nbsp;
1934 <BR>
1935 &nbsp;
1936 <BR>
1937 &nbsp;&nbsp;return&nbsp;acceptor;&nbsp;
1938 <BR>
1939 }</DD>
1940 </DL></DD>
1942 <DT><STRONG><TT>make_connector</TT>.</STRONG></DT>
1943 <DD>The <TT>make_connector</TT> method is a factory
1944 method that returns a pointer to a dynamically allocated <TT>Connector</TT>
1945 specific to the pluggable protocol to which the <TT>Protocol_Factory</TT> object
1946 belongs. TAO's UIOP pluggable protocol implementation defines this method as
1947 follows:
1951 <DL COMPACT>
1952 <DT>
1953 <DD>TAO_Connector&nbsp;*&nbsp;
1954 <BR>
1955 TAO_UIOP_Protocol_Factory::make_connector&nbsp;(void)&nbsp;
1956 <BR>
1957 {&nbsp;
1958 <BR>
1959 &nbsp;&nbsp;TAO_Connector&nbsp;*connector&nbsp;=&nbsp;0;&nbsp;
1960 <BR>
1961 &nbsp;
1962 <BR>
1963 &nbsp;&nbsp;ACE_NEW_RETURN&nbsp;(connector,&nbsp;
1964 <BR>
1965 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_UIOP_Connector,&nbsp;
1966 <BR>
1967 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0);&nbsp;
1968 <BR>
1969 &nbsp;
1970 <BR>
1971 &nbsp;&nbsp;return&nbsp;connector;&nbsp;
1972 <BR>
1973 }</DD>
1974 </DL></DD>
1976 <DT><STRONG><TT>requires_explicit_endpoint</TT>.</STRONG></DT>
1977 <DD>Some protocols should not create a default
1978 endpoint unless the user specifies a <TT>-ORBEndpoint</TT> option. For example, local
1979 IPC (aka UNIX domain sockets) is unable to remove the rendesvouz point if the
1980 server crashes. For those protocols, it is better to create the endpoint only
1981 if the user requests one. This method is queried by TAO before creating a default
1982 acceptor during ORB initialization. If it returns <TT>1</TT> then no default
1983 endpoint should be created.</DD>
1984 </DL>
1985 <TT>Service Object</TT>s, such as the <TT>Protocol_Factory</TT>, must be declared
1986 in a certain way. ACE's Service Configurator implementation provides two macros
1987 to ensure that the required additional declarations are made to make an object
1988 have to the correct interface. The two macros are <TT>ACE_STATIC_SVC_DECLARE</TT>
1989 and <TT>ACE_FACTORY_DECLARE</TT>. Typical usage of these declaration macros
1990 is demonstrated by TAO's UIOP pluggable protocol implementation:
1994 <DL COMPACT>
1995 <DT>
1996 <DD>ACE_STATIC_SVC_DECLARE&nbsp;(TAO_UIOP_Protocol_Factory)&nbsp;
1997 <BR>
1998 ACE_FACTORY_DECLARE&nbsp;(TAO,&nbsp;TAO_UIOP_Protocol_Factory)</DD>
1999 </DL>also required. These are provided by ``<TT>DEFINE</TT>'' counterparts of the
2000 above two declaration macros. An example of how to use them follows:
2004 <DL COMPACT>
2005 <DT>
2006 <DD>ACE_STATIC_SVC_DEFINE&nbsp;(TAO_UIOP_Protocol_Factory,&nbsp;
2007 <BR>
2008 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ASYS_TEXT&nbsp;(&#34;UIOP_Factory&#34;),&nbsp;
2009 <BR>
2010 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_SVC_OBJ_T,&nbsp;
2011 <BR>
2012 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;ACE_SVC_NAME&nbsp;(TAO_UIOP_Protocol_Factory),&nbsp;
2013 <BR>
2014 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_Service_Type::DELETE_THIS&nbsp;|&nbsp;
2015 <BR>
2016 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_Service_Type::DELETE_OBJ,&nbsp;
2017 <BR>
2018 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0)&nbsp;
2019 <BR>
2020 &nbsp;
2021 <BR>
2022 ACE_FACTORY_DEFINE&nbsp;(TAO,&nbsp;TAO_UIOP_Protocol_Factory)</DD>
2023 </DL>Notice that the macro arguments above have corresponding <TT>Service Configurator</TT>
2024 configuration file entries:
2028 <DL COMPACT>
2029 <DT>
2030 <DD>dynamic&nbsp;UIOP_Factory&nbsp;Service_Object&nbsp;*&nbsp;TAO:_make_TAO_UIOP_Protocol_Factory()&nbsp;&#34;&#34;&nbsp;
2031 <BR>
2032 static&nbsp;Resource_Factory&nbsp;&#34;-ORBProtocolFactory&nbsp;UIOP_Factory&#34;</DD>
2033 </DL>
2036 <H3><A NAME="SECTION250" HREF="#TOC_SECTION250">
2037 The <TT>Transport</TT> Object</A>
2038 </H3>
2042 <H3><A NAME="SECTION251" HREF="#TOC_SECTION251">
2043 Context</A>
2044 </H3>
2047 It is desirable to provide for alternative mappings between different ORB messaging
2048 protocols and ORB transport adaptors. For example, a single ORB messaging protocol
2049 such as GIOP can be mapped to any reliable, connection-oriented transport protocol,
2050 such as TCP or TP4. Alternatively, a single transport protocol can be the basis
2051 for alternative instantiations of ORB messaging protocols, <I>e.g.</I>, different
2052 versions of GIOP differing in the number and types of messages, as well as in
2053 the format of those messages.
2056 An ORB messaging protocol imposes requirements on any underlying network transport
2057 protocols. For instance, the transport requirements assumed by GIOP, see Section&nbsp;<A HREF="#IOP"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]"
2058 SRC="cross_ref_motif.png"></A>,
2059 require the underlying network transport protocol to support a reliable, connection-oriented
2060 byte-stream. These requirements are fulfilled by TCP thus leading to the direct
2061 mapping of GIOP onto this transport protocol. However, alternative network transport
2062 protocols such as ATM with AAL5 encapsulation may be more appropriate in some
2063 environments. In this case, the messaging implementation will have to provide
2064 the missing semantics, such as reliability, in order to use GIOP.
2068 <H3><A NAME="SECTION252" HREF="#TOC_SECTION252">
2069 Problem</A>
2070 </H3>
2073 The ORB Messaging protocol implementations must be independent of the adaptation
2074 layer needed for transports that do not satisfy all their requirements. Otherwise,
2075 the same messaging protocol may be re-implemented needlessly for each transport,
2076 which is time-consuming, error-prone, and time/space inefficient. Likewise,
2077 for those transports that can support multiple ORB Messaging protocols, it must
2078 be possible to isolate them from the details of the ORB messaging implementation.
2079 Care must be taken, however, because not all ORB Messaging protocols can be
2080 used with all transport protocols, <I>i.e.</I>, some mechanism is needed to
2081 ensure only semantically compatible protocols are configured&nbsp;[<A
2082 HREF="#Johnson:95a">4</A>].
2084 <P></P>
2085 <DIV ALIGN="CENTER"><A NAME="iop_client"></A><A NAME="700"></A>
2086 <TABLE>
2087 <CAPTION ALIGN="BOTTOM"><STRONG>Figure 4:</STRONG>
2088 Client Inter-ORB and Transport Class Diagram</CAPTION>
2089 <TR><TD><P>
2093 <DIV ALIGN="CENTER">
2094 <!-- MATH
2095 $\resizebox* {5in}{!}{\includegraphics{graphics/pp_iopc.eps}}$
2097 <IMG
2098 WIDTH="568" HEIGHT="537" ALIGN="BOTTOM" BORDER="0"
2099 SRC="img4.png"
2100 ALT="pp_iopc"> </DIV>
2102 <DIV ALIGN="CENTER"></DIV></TD></TR>
2103 </TABLE>
2104 </DIV><P></P>
2108 <H3><A NAME="SECTION253" HREF="#TOC_SECTION253">
2109 Solution</A>
2110 </H3>
2113 Use the Layers architecture pattern&nbsp;[<A
2114 HREF="#Buschmann:95b">5</A>], which decomposes
2115 the system into groups of components, each one at a different level of abstraction.<A NAME="tex2html5"
2116 HREF="#foot549"><SUP>1</SUP></A> For the client, the ORB uses a particular ORB messaging protocol to send a
2117 request. This ORB messaging protocol delegates part of the work to the transport
2118 adapter component that completes the message and sends it to the server. If
2119 the low-level transport in use, <I>e.g.</I>, ATM, UDP, TCP/IP, etc., does not
2120 satisfy the requirements of the ORB messaging protocol, the ORB transport adapter
2121 component can implement them.
2124 In the server, the transport adapter component receives data from the underlying
2125 communication infrastructure, such as sockets or shared memory, and it passes
2126 the message up to the ORB messaging layer. As with the client, this layer can
2127 be very lightweight if the requirements imposed by the ORB messaging layer are
2128 satisfied by the underlying network transport protocol. Otherwise, it must implement
2129 those missing requirements by building them into the concrete transport adapter
2130 component.
2132 <P></P>
2133 <DIV ALIGN="CENTER"><A NAME="iop_server"></A><A NAME="702"></A>
2134 <TABLE>
2135 <CAPTION ALIGN="BOTTOM"><STRONG>Figure 5:</STRONG>
2136 Server Inter-ORB and Transport Class Diagram</CAPTION>
2137 <TR><TD><P>
2141 <DIV ALIGN="CENTER">
2142 <!-- MATH
2143 $\resizebox* {5in}{!}{\includegraphics{graphics/pp_iops.eps}}$
2145 <IMG
2146 WIDTH="422" HEIGHT="563" ALIGN="BOTTOM" BORDER="0"
2147 SRC="img5.png"
2148 ALT="pp_iops"> </DIV>
2150 <DIV ALIGN="CENTER"></DIV></TD></TR>
2151 </TABLE>
2152 </DIV><P></P>
2156 <H3><A NAME="SECTION254" HREF="#TOC_SECTION254">
2157 Applying the solution in TAO</A>
2158 </H3>
2161 As shown in Figure&nbsp;<A HREF="#iop_client">4</A>, TAO
2162 implements the messaging protocol and the transport protocol in
2163 separate components. The client ORB uses the current profile to
2164 find the right transport and ORB messaging implementations. The
2165 creation and initialization of these classes is controlled by
2166 the <A HREF="#design:connect"><TT>Connector</TT></A>, with each
2167 <TT>Connector</TT> instance handling a particular ORB
2168 messaging/transport tuple.
2172 Figure&nbsp;<A HREF="#iop_server">5</A> illustrates how the
2173 server's implementation uses the same transport classes, but
2174 with a different relationship. In particular, the transport
2175 class calls back the messaging class when data is received from
2176 the IPC mechanism. As with the client, a factory, in this case
2177 the <A HREF="#design:accept"><TT>Acceptor</TT></A>, creates and
2178 initializes these objects.
2182 <H3><A NAME="SECTION255" HREF="#TOC_SECTION255">
2183 <TT>Transport</TT> Implementation</A>
2184 </H3>
2187 A <TT>Transport</TT> implements
2188 external polymorphism&nbsp;[<A HREF="#Schmidt:97e">2</A>] over the
2189 <TT>Client_Connection_Handler</TT> and the
2190 <TT>Service_Connection_Handler</TT> objects described in the
2191 <A HREF="#SECTION260"><TT>Connection_Handler</TT></A> section of this
2192 document. A <TT>Connection_Handler</TT> is simply a template
2193 instantiation of <TT>ACE_Svc_Handler&lt;&gt;</TT>, but they don't do
2194 much work. They just delegate on the <TT>Transport</TT> classes.
2195 This somewhat strange design is easy to understand once it is realized
2196 that not all <TT>ACE_Svc_Handler&lt;&gt;</TT> classes are type
2197 compatible (except in their most basic <TT>ACE_Event_Handler</TT>
2198 form) so they must be wrapped using the <TT>TAO_Transport</TT>
2199 class.
2202 All TAO pluggable protocol <TT>Transport</TT> classes must inherit from the
2203 <TT>TAO_Transport</TT> abstract base class defined in <TT>&lt;<A HREF="../../tao/Transport.h">tao/Transport.h</A>&gt;</TT>.
2204 The <TT>TAO_Transport</TT> interface is shown below. Again, only the methods
2205 that should be implemented for a given pluggable protocol are shown:
2209 <DL COMPACT>
2210 <DT>
2211 <DD>class&nbsp;TAO_Export&nbsp;TAO_Transport&nbsp;
2212 <BR>
2213 {&nbsp;
2214 <BR>
2215 &nbsp;&nbsp;//&nbsp;=&nbsp;TITLE&nbsp;
2216 <BR>
2217 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;Generic&nbsp;definitions&nbsp;for&nbsp;the&nbsp;Transport&nbsp;class.&nbsp;
2218 <BR>
2219 &nbsp;&nbsp;//&nbsp;
2220 <BR>
2221 &nbsp;&nbsp;//&nbsp;=&nbsp;DESCRIPTION&nbsp;
2222 <BR>
2223 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;The&nbsp;transport&nbsp;object&nbsp;is&nbsp;created&nbsp;in&nbsp;the&nbsp;Service&nbsp;handler&nbsp;
2224 <BR>
2225 &nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;constructor&nbsp;and&nbsp;deleted&nbsp;in&nbsp;the&nbsp;service&nbsp;handler's&nbsp;destructor!!&nbsp;
2226 <BR>
2227 &nbsp;
2228 <BR>
2229 public:&nbsp;
2230 <BR>
2231 &nbsp;&nbsp;TAO_Transport&nbsp;(CORBA::ULong&nbsp;tag,&nbsp;
2232 <BR>
2233 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_ORB_Core&nbsp;*orb_core);&nbsp;
2234 <BR>
2235 &nbsp;&nbsp;//&nbsp;default&nbsp;creator,&nbsp;requres&nbsp;the&nbsp;tag&nbsp;value&nbsp;be&nbsp;supplied.&nbsp;
2236 <BR>
2237 &nbsp;
2238 <BR>
2239 &nbsp;&nbsp;virtual&nbsp;~TAO_Transport&nbsp;(void);&nbsp;
2240 <BR>
2241 &nbsp;&nbsp;//&nbsp;destructor&nbsp;
2242 <BR>
2243 &nbsp;
2244 <BR>
2245 &nbsp;&nbsp;virtual&nbsp;void&nbsp;close_connection&nbsp;(void)&nbsp;=&nbsp;0;&nbsp;
2246 <BR>
2247 &nbsp;&nbsp;//&nbsp;Call&nbsp;the&nbsp;corresponding&nbsp;connection&nbsp;handler's&nbsp;&lt;close&gt;&nbsp;
2248 <BR>
2249 &nbsp;&nbsp;//&nbsp;method.&nbsp;
2250 <BR>
2251 &nbsp;
2252 <BR>
2253 &nbsp;&nbsp;virtual&nbsp;int&nbsp;idle&nbsp;(void)&nbsp;=&nbsp;0;&nbsp;
2254 <BR>
2255 &nbsp;&nbsp;//&nbsp;Idles&nbsp;the&nbsp;corresponding&nbsp;connection&nbsp;handler.&nbsp;
2256 <BR>
2257 &nbsp;
2258 <BR>
2259 &nbsp;&nbsp;virtual&nbsp;ACE_HANDLE&nbsp;handle&nbsp;(void)&nbsp;=&nbsp;0;&nbsp;
2260 <BR>
2261 &nbsp;&nbsp;//&nbsp;This&nbsp;method&nbsp;provides&nbsp;a&nbsp;way&nbsp;to&nbsp;gain&nbsp;access&nbsp;to&nbsp;the&nbsp;underlying&nbsp;file&nbsp;
2262 <BR>
2263 &nbsp;&nbsp;//&nbsp;handle&nbsp;used&nbsp;by&nbsp;the&nbsp;reactor.&nbsp;
2264 <BR>
2265 &nbsp;
2266 <BR>
2267 &nbsp;&nbsp;virtual&nbsp;ACE_Event_Handler&nbsp;*event_handler&nbsp;(void)&nbsp;=&nbsp;0;&nbsp;
2268 <BR>
2269 &nbsp;&nbsp;//&nbsp;This&nbsp;method&nbsp;provides&nbsp;a&nbsp;way&nbsp;to&nbsp;gain&nbsp;access&nbsp;to&nbsp;the&nbsp;underlying&nbsp;event&nbsp;
2270 <BR>
2271 &nbsp;&nbsp;//&nbsp;handler&nbsp;used&nbsp;by&nbsp;the&nbsp;reactor.&nbsp;
2272 <BR>
2273 &nbsp;
2274 <BR>
2275 &nbsp;&nbsp;virtual&nbsp;ssize_t&nbsp;send&nbsp;(TAO_Stub&nbsp;*stub,&nbsp;
2276 <BR>
2277 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;ACE_Message_Block&nbsp;*mblk,&nbsp;
2278 <BR>
2279 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;ACE_Time_Value&nbsp;*s&nbsp;=&nbsp;0)&nbsp;=&nbsp;0;&nbsp;
2280 <BR>
2281 &nbsp;&nbsp;virtual&nbsp;ssize_t&nbsp;send&nbsp;(const&nbsp;ACE_Message_Block&nbsp;*mblk,&nbsp;
2282 <BR>
2283 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;ACE_Time_Value&nbsp;*s&nbsp;=&nbsp;0)&nbsp;=&nbsp;0;&nbsp;
2284 <BR>
2285 &nbsp;&nbsp;//&nbsp;Write&nbsp;the&nbsp;complete&nbsp;Message_Block&nbsp;chain&nbsp;to&nbsp;the&nbsp;connection.&nbsp;
2286 <BR>
2287 &nbsp;&nbsp;//&nbsp;@@&nbsp;The&nbsp;ACE_Time_Value&nbsp;*s&nbsp;is&nbsp;just&nbsp;a&nbsp;place&nbsp;holder&nbsp;for&nbsp;now.&nbsp;&nbsp;It&nbsp;is&nbsp;
2288 <BR>
2289 &nbsp;&nbsp;//&nbsp;not&nbsp;clear&nbsp;this&nbsp;this&nbsp;is&nbsp;the&nbsp;best&nbsp;place&nbsp;to&nbsp;specify&nbsp;this.&nbsp;&nbsp;The&nbsp;actual&nbsp;
2290 <BR>
2291 &nbsp;&nbsp;//&nbsp;timeout&nbsp;values&nbsp;will&nbsp;be&nbsp;kept&nbsp;in&nbsp;the&nbsp;Policies.&nbsp;
2292 <BR>
2293 &nbsp;
2294 <BR>
2295 &nbsp;&nbsp;virtual&nbsp;ssize_t&nbsp;send&nbsp;(const&nbsp;u_char&nbsp;*buf,&nbsp;
2296 <BR>
2297 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size_t&nbsp;len,&nbsp;
2298 <BR>
2299 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;ACE_Time_Value&nbsp;*s&nbsp;=&nbsp;0)&nbsp;=&nbsp;0;&nbsp;
2300 <BR>
2301 &nbsp;&nbsp;//&nbsp;Write&nbsp;the&nbsp;contents&nbsp;of&nbsp;the&nbsp;buffer&nbsp;of&nbsp;length&nbsp;len&nbsp;to&nbsp;the&nbsp;connection.&nbsp;
2302 <BR>
2303 &nbsp;
2304 <BR>
2305 &nbsp;&nbsp;virtual&nbsp;ssize_t&nbsp;recv&nbsp;(char&nbsp;*buf,&nbsp;
2306 <BR>
2307 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size_t&nbsp;len,&nbsp;
2308 <BR>
2309 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;ACE_Time_Value&nbsp;*s&nbsp;=&nbsp;0)&nbsp;=&nbsp;0;&nbsp;
2310 <BR>
2311 &nbsp;&nbsp;//&nbsp;Read&nbsp;len&nbsp;bytes&nbsp;from&nbsp;into&nbsp;buf.&nbsp;
2312 <BR>
2313 &nbsp;&nbsp;//&nbsp;@@&nbsp;The&nbsp;ACE_Time_Value&nbsp;*s&nbsp;is&nbsp;just&nbsp;a&nbsp;place&nbsp;holder&nbsp;for&nbsp;now.&nbsp;&nbsp;It&nbsp;is&nbsp;
2314 <BR>
2315 &nbsp;&nbsp;//&nbsp;not&nbsp;clear&nbsp;this&nbsp;this&nbsp;is&nbsp;the&nbsp;best&nbsp;place&nbsp;to&nbsp;specify&nbsp;this.&nbsp;&nbsp;The&nbsp;actual&nbsp;
2316 <BR>
2317 &nbsp;&nbsp;//&nbsp;timeout&nbsp;values&nbsp;will&nbsp;be&nbsp;kept&nbsp;in&nbsp;the&nbsp;Policies.&nbsp;
2318 <BR>
2319 &nbsp;
2320 <BR>
2321 &nbsp;&nbsp;virtual&nbsp;void&nbsp;start_request&nbsp;(TAO_ORB_Core&nbsp;*orb_core,&nbsp;
2322 <BR>
2323 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;TAO_Profile&nbsp;*profile,&nbsp;
2324 <BR>
2325 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_OutputCDR&nbsp;&amp;output,&nbsp;
2326 <BR>
2327 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CORBA::Environment&nbsp;&amp;ACE_TRY_ENV&nbsp;=&nbsp;
2328 <BR>
2329 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_default_environment&nbsp;())&nbsp;
2330 <BR>
2331 &nbsp;&nbsp;&nbsp;&nbsp;ACE_THROW_SPEC&nbsp;((CORBA::SystemException));&nbsp;
2332 <BR>
2333 &nbsp;&nbsp;//&nbsp;Fill&nbsp;into&nbsp;&lt;output&gt;&nbsp;the&nbsp;right&nbsp;headers&nbsp;to&nbsp;make&nbsp;a&nbsp;request.&nbsp;
2334 <BR>
2335 &nbsp;
2336 <BR>
2337 &nbsp;&nbsp;virtual&nbsp;void&nbsp;start_locate&nbsp;(TAO_ORB_Core&nbsp;*orb_core,&nbsp;
2338 <BR>
2339 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;TAO_Profile&nbsp;*profile,&nbsp;
2340 <BR>
2341 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CORBA::ULong&nbsp;request_id,&nbsp;
2342 <BR>
2343 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_OutputCDR&nbsp;&amp;output,&nbsp;
2344 <BR>
2345 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CORBA::Environment&nbsp;&amp;ACE_TRY_ENV&nbsp;=&nbsp;
2346 <BR>
2347 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_default_environment&nbsp;())&nbsp;
2348 <BR>
2349 &nbsp;&nbsp;&nbsp;&nbsp;ACE_THROW_SPEC&nbsp;((CORBA::SystemException));&nbsp;
2350 <BR>
2351 &nbsp;&nbsp;//&nbsp;Fill&nbsp;into&nbsp;&lt;output&gt;&nbsp;the&nbsp;right&nbsp;headers&nbsp;to&nbsp;make&nbsp;a&nbsp;locate&nbsp;request.&nbsp;
2352 <BR>
2353 &nbsp;
2354 <BR>
2355 &nbsp;&nbsp;virtual&nbsp;int&nbsp;send_request&nbsp;(TAO_Stub&nbsp;*stub,&nbsp;
2356 <BR>
2357 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_ORB_Core&nbsp;*orb_core,&nbsp;
2358 <BR>
2359 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TAO_OutputCDR&nbsp;&amp;stream,&nbsp;
2360 <BR>
2361 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;twoway,&nbsp;
2362 <BR>
2363 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_Time_Value&nbsp;*max_time_wait)&nbsp;=&nbsp;0;&nbsp;
2364 <BR>
2365 &nbsp;&nbsp;//&nbsp;Depending&nbsp;on&nbsp;the&nbsp;concurrency&nbsp;strategy&nbsp;used&nbsp;by&nbsp;the&nbsp;transport&nbsp;it&nbsp;
2366 <BR>
2367 &nbsp;&nbsp;//&nbsp;may&nbsp;be&nbsp;required&nbsp;to&nbsp;setup&nbsp;state&nbsp;to&nbsp;receive&nbsp;a&nbsp;reply&nbsp;before&nbsp;the&nbsp;
2368 <BR>
2369 &nbsp;&nbsp;//&nbsp;request&nbsp;is&nbsp;sent.&nbsp;
2370 <BR>
2371 &nbsp;&nbsp;//&nbsp;Using&nbsp;this&nbsp;method,&nbsp;instead&nbsp;of&nbsp;send(),&nbsp;allows&nbsp;the&nbsp;transport&nbsp;(and&nbsp;
2372 <BR>
2373 &nbsp;&nbsp;//&nbsp;wait&nbsp;strategy)&nbsp;to&nbsp;take&nbsp;appropriate&nbsp;action.&nbsp;
2374 <BR>
2375 &nbsp;
2376 <BR>
2377 &nbsp;&nbsp;virtual&nbsp;int&nbsp;handle_client_input&nbsp;(int&nbsp;block&nbsp;=&nbsp;0,&nbsp;
2378 <BR>
2379 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_Time_Value&nbsp;*max_wait_time&nbsp;=&nbsp;0);&nbsp;
2380 <BR>
2381 &nbsp;&nbsp;//&nbsp;Read&nbsp;and&nbsp;handle&nbsp;the&nbsp;reply.&nbsp;Returns&nbsp;0&nbsp;when&nbsp;there&nbsp;is&nbsp;Short&nbsp;Read&nbsp;on&nbsp;
2382 <BR>
2383 &nbsp;&nbsp;//&nbsp;the&nbsp;connection.&nbsp;Returns&nbsp;1&nbsp;when&nbsp;the&nbsp;full&nbsp;reply&nbsp;is&nbsp;read&nbsp;and&nbsp;
2384 <BR>
2385 &nbsp;&nbsp;//&nbsp;handled.&nbsp;Returns&nbsp;-1&nbsp;on&nbsp;errors.&nbsp;
2386 <BR>
2387 &nbsp;&nbsp;//&nbsp;If&nbsp;&lt;block&gt;&nbsp;is&nbsp;1,&nbsp;then&nbsp;reply&nbsp;is&nbsp;read&nbsp;in&nbsp;a&nbsp;blocking&nbsp;manner.&nbsp;
2388 <BR>
2389 &nbsp;
2390 <BR>
2391 &nbsp;&nbsp;virtual&nbsp;int&nbsp;register_handler&nbsp;(void);&nbsp;
2392 <BR>
2393 &nbsp;&nbsp;//&nbsp;Register&nbsp;the&nbsp;handler&nbsp;with&nbsp;the&nbsp;reactor.&nbsp;Will&nbsp;be&nbsp;called&nbsp;by&nbsp;the&nbsp;Wait&nbsp;
2394 <BR>
2395 &nbsp;&nbsp;//&nbsp;Strategy&nbsp;if&nbsp;Reactor&nbsp;is&nbsp;used&nbsp;&nbsp;for&nbsp;that&nbsp;strategy.&nbsp;Default&nbsp;
2396 <BR>
2397 &nbsp;&nbsp;//&nbsp;implementation&nbsp;out&nbsp;here&nbsp;returns&nbsp;-1&nbsp;setting&nbsp;&lt;errno&gt;&nbsp;to&nbsp;ENOTSUP.&nbsp;
2398 <BR>
2399 &nbsp;
2400 <BR>
2401 };</DD>
2402 </DL>Each method is described below:
2406 <DL>
2407 <DT><STRONG>The&nbsp;Constructor.</STRONG></DT>
2408 <DD>As with all of the TAO pluggable protocol framework components
2409 described so far, the constructor for the concrete <TT>Transport</TT> object
2410 should also initialize the <TT>TAO_Transport</TT> base class with the tag corresponding
2411 to the pluggable protocol.</DD>
2413 <DT><STRONG><TT>close_connection</TT>.</STRONG></DT>
2414 <DD>The underlying <TT>Connection Handler</TT>'s <TT>close</TT>
2415 method is invoked my this method.</DD>
2417 <DT><STRONG><TT>idle</TT>.</STRONG></DT>
2418 <DD>This method idles the underlying <TT>Connection Handler</TT>.</DD>
2420 <DT><STRONG><TT>handle</TT>.</STRONG></DT>
2421 <DD>This method returns the underlying file handle used by the
2422 <TT>Reactor</TT>.</DD>
2424 <DT><STRONG><TT>event_handler</TT>.</STRONG></DT>
2425 <DD>This method returns the underlying <TT>Event Handler</TT>
2426 used by the <TT>Reactor</TT>.</DD>
2428 <DT><STRONG><TT>send</TT>.</STRONG></DT>
2429 <DD>The <TT>send</TT> writes data to the connection established
2430 in the underlying transport, such as a TCP connection in the IIOP pluggable
2431 protocol. Three versions of this method must be implemented. Two of them write
2432 data contained within an <TT>ACE_Message_Block</TT> and the remaining simply
2433 sends the data within a buffer of a given length.
2435 When implementing this method, it is important to be aware of the correct underlying
2436 <TT>send</TT> or <TT>write</TT> operation to use. Some of TAO's existing pluggable
2437 protocols use the <TT>send</TT> calls provided by the operating system because
2438 no further processing of the data being sent is necessary. However, other protocols
2439 may process perform additional operations on the data being sent, in which case
2440 the <TT>send</TT> operation provided by the underlying protocol implementation
2441 should be used instead of the raw operating system <TT>send</TT> call.
2442 </DD>
2444 <DT><STRONG><TT>recv</TT>.</STRONG></DT>
2445 <DD>The <TT>recv</TT> operation reads a given number of bytes into
2446 a supplied buffer. Unlike the <TT>send</TT> method, there is only one version
2447 of the <TT>recv</TT> operation. The same caveat of ensuring that the appropriate
2448 <TT>recv</TT> or <TT>read</TT> operation is used also applies to this method.</DD>
2450 <DT><STRONG><TT>start_request</TT>.</STRONG></DT>
2451 <DD>This method creates the appropriate header to make
2452 a request and write it into the provided output CDR stream. This method is closely
2453 tied to TAO's GIOP implementation. <TT>start_request</TT> implementations should
2454 essentially be the same in all pluggable protocol implementations. The only
2455 thing that should differ is the type of <TT>Profile</TT> being used. Note that
2456 this method is only useful for clients.</DD>
2458 <DT><STRONG><TT>start_locate</TT>.</STRONG></DT>
2459 <DD>This method creates the appropriate header to make
2460 a <I>locate</I> request and write it into the provided output CDR stream. This
2461 method is closely tied to TAO's GIOP implementation. <TT>start_locate</TT>
2462 implementations should essentially be the same in all pluggable protocol implementations.
2463 The only thing that should differ is the type of <TT>Profile</TT> being used.
2464 Note that this method is only useful for clients. Note that this method is only
2465 useful for clients.</DD>
2467 <DT><STRONG><TT>send_request</TT>.</STRONG></DT>
2468 <DD>Depending on the concurrency strategy used by the transport
2469 it may be required to setup state to receive a reply before the request is sent.
2470 Using this method, instead of <TT>send</TT>, allows the transport (and wait
2471 strategy) to take appropriate action. This method is closely tied to TAO's GIOP
2472 implementation. <TT>send_request</TT> implementations should essentially be
2473 the same in all pluggable protocol implementations. The only thing that should
2474 differ is the type of <TT>Profile</TT> being used. Note that this method is
2475 only useful for clients.</DD>
2477 <DT><STRONG><TT>handle_client_input</TT>.</STRONG></DT>
2478 <DD><TT>handle_client_input</TT> reads and handles
2479 the reply from the server. It returns zero when there is <TT>Short Read</TT>
2480 on the connection, returns <TT>1</TT> when the full reply is read and handled,
2481 and returns <TT>-1</TT> on errors. Note that this method is only useful for
2482 clients.</DD>
2484 <DT><STRONG><TT>register_handler</TT>.</STRONG></DT>
2485 <DD>This method registers the <TT>Connection Handler</TT>
2486 with the <TT>Reactor</TT>. It will be called by the <TT>Wait Strategy</TT> if
2487 the <TT>Reactor</TT> is used for that strategy. This code should essentially
2488 be ``boilerplate'' code. It shouldn't differ much between pluggable protocol
2489 implementations if the same ACE event handling and dispatching components are
2490 used. Note that this method may be deprecated in the future.</DD>
2491 </DL>
2492 There other methods in the <TT>TAO_Transport</TT> that can be overridden. However,
2493 the default implementations should be more than satisfactory for most pluggable
2494 protocols.
2497 TAO's existing pluggable protocols implement client-side and server-side specific
2498 <TT>Transport</TT>s. For the most part, they can be used as references for other
2499 pluggable protocols.
2501 <H3><A NAME="SECTION260" HREF="#TOC_SECTION260">
2502 The <TT>Connection_Handler</TT></A>
2503 </H3>
2504 A <TT>Connection_Handler</TT> is simply a template instantiation of
2505 <TT>ACE_Svc_Handler&lt;&gt;</TT>&nbsp;[<A HREF="#Schmidt:97c">1</A>],
2506 a service handler. <TT>ACE_Svc_Handler</TT>s provide a well-defined
2507 interface that <TT>Acceptor</TT> and <TT>Connector</TT> pattern
2508 factories use as their target. Service handlers perform
2509 application-specific processing and communicate via the connection
2510 established by the <TT>Connector</TT> and <TT>Acceptor</TT>
2511 components. Typically, TAO <TT>Connection_Handler</TT>s will subclass
2512 <TT>ACE_Svc_Handler</TT> and do all the interesting work in the
2513 subclass.
2517 <H3><A NAME="SECTION261" HREF="#TOC_SECTION261">
2518 <TT>Connection_Handler</TT> Implementation</A>
2519 </H3>
2521 TAO pluggable transport protocol <TT>Connection_Handler</TT>s should
2522 be derived from the <TT>ACE_Svc_Handler</TT> class declared in
2523 &lt;<A
2524 HREF="../../../ace/Svc_Handler.h"><TT>ace/Svc_Handler.h</TT></A>&gt;. TAO's existing pluggable transport protocol
2525 implementations define three classes, a base class derived from an
2526 <TT>ACE_Svc_Handler</TT> specific to that protocol, and a client-side
2527 and a server-side class derived from that base class. Generally, it
2528 is a good idea to base new <TT>Connection_Handler</TT> implementations
2529 on TAO's existing ones. The interfaces for the existing
2530 <TT>Connection_Handler</TT>s are defined in
2531 &lt;<A HREF="../../tao/IIOP_Connect.h"><TT>tao/IIOP_Connect.h</TT></A>&gt;
2533 &lt;<A HREF="../../tao/UIOP_Connect.h"><TT>tao/UIOP_Connect.h</TT></A>&gt;.
2536 <HR>
2539 <H3><A NAME="SECTION300" HREF="#TOC_SECTION300">
2540 Notes From a ``Real World'' Pluggable Protocol Implementation</A>
2541 </H3>
2543 By Bruce Trask &lt;<A
2544 HREF="mailto:btrask@contactsystems.com">btrask@contactsystems.com</A>&gt;
2546 <P>This section is based on notes I took when adding a different
2547 transport layer to the TAO ORB. I was given some initial guidelines
2548 on adding an additional protocol and these proved very helpful.
2549 Beyond that there was not much more documentation and so I hope the
2550 information in this paper will serve to further assist anybody whose
2551 is adding a pluggable protocol to the TAO ORB.
2553 <P>I found that in order to successfully add the new protocol capabilities, one had to
2554 have a very good understanding of some of the patterns upon which the ACE framework
2555 is built. These are the REACTOR, ACCEPTOR, CONNECTOR, FACTORY, STRATEGY,
2556 and SERVICE CONFIGURATOR PATTERN. The papers that I found helpful on these
2557 were:
2558 <BR>
2559 <BLOCKQUOTE>
2560 Reactor (
2561 <A HREF="http://www.cs.wustl.edu/~schmidt/Reactor.ps.gz">PostScript</A> |
2562 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/Reactor.pdf">PDF</A>
2563 )<BR>
2565 Reactor1-93 (
2566 <A HREF="http://www.cs.wustl.edu/~schmidt/Reactor1-93.ps.gz">PostScript</A> |
2567 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/Reactor1-93.pdf">PDF</A>
2568 )<BR>
2570 Reactor2-93 (
2571 <A HREF="http://www.cs.wustl.edu/~schmidt/Reactor2-93.ps.gz">PostScript</A> |
2572 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/Reactor2-93.pdf">PDF</A>
2573 )<BR>
2575 reactor-rules (
2576 <A HREF="http://www.cs.wustl.edu/~schmidt/reactor-rules.ps.gz">PostScript</A> |
2577 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/reactor-rules.pdf">PDF</A>
2578 )<BR>
2580 reactor-siemens (
2581 <A HREF="http://www.cs.wustl.edu/~schmidt/reactor-siemens.ps.gz">PostScript</A> |
2582 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/reactor-siemens.pdf">PDF</A>
2583 )<BR>
2585 Svc-Conf (
2587 HREF="http://www.cs.wustl.edu/~schmidt/Svc-Conf.ps.gz">PostScript</A> |
2588 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/Svc-Conf.pdf">PDF</A>
2589 )<BR>
2591 Acc-Con (
2592 <A HREF="http://www.cs.wustl.edu/~schmidt/Acc-Con.ps.gz">PostScript</A>
2593 <A HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/Acc-Con.pdf">PDF</A>
2595 </BLOCKQUOTE>
2596 <P>These are all readily available from the TAO and ACE website.
2597 <P>My starting point for understanding how to add a pluggable protocol
2598 to the TAO ORB came from mailing list entry from <A
2599 HREF="mailto:coryan@uci.edu">Carlos O'Ryan</A>. One can find it
2600 in the archives of the comp.soft-sys.ace newsgroup. It is dated
2601 1999/06/02 RE: [ace-users] TAO: ATM pluggable protocol. I will repeat
2602 the section of that email that was particularly useful to me. (In the
2603 email, he is responding to someone who had inquired about adding the
2604 ATM protocol). <p>
2606 <BLOCKQUOTE>
2607 Basically, you need to look at the following files:<BR>
2609 <BLOCKQUOTE>
2610 IIOP_Profile.{h,i,cpp}<BR>
2611 IIOP_Connector.{h,i,cpp}<BR>
2612 IIOP_Acceptor.{h,i,cpp}<BR>
2613 IIOP_Factory.{h,i,cpp}<BR>
2614 IIOP_Transport.{h,i,cpp}<BR>
2615 Connect.{h,i,cpp} [probably will be renamed IIOP_Connect VSN]
2616 </BLOCKQUOTE>
2619 The profile class handles the addressing format for your transport.
2620 It would basically be a wrapper around the ACE_ATM_Addr() class. The
2621 Connector and Acceptor classes are simply wrappers around
2622 ACE_Acceptor&lt;ACE_ATM_ACCEPTOR&gt; and
2623 ACE_Connector&lt;ACE_ATM_ACCEPTOR&gt;, again no big deal (I think).
2624 The factory is even simpler.
2627 Things get really interesting in the Transport and Connect classes.
2628 Transport just implements external polymorphism over the
2629 Client_Connection_Handler and the Service_Connection_Handler objects
2630 defined in the Connect.{h,i,cpp}, those are simply
2631 ACE_Svc_Handler&lt;ACE_ATM_Stream&gt;, but they don't do much work,
2632 they just delegate on the Transport classes. This somewhat strange
2633 design is easy to understand once you realize that all the
2634 ACE_Svc_Handler&lt;&gt; classes are not type compatible (except in
2635 their most basic ACE_Event_Handler form). So they must be wrapped
2636 using the TAO_Transport class.
2637 </BLOCKQUOTE>
2640 <P>Make sure to review
2641 ``<A HREF="../releasenotes/index.html#pp">Pluggable Protocols</A>''
2643 ``<A HREF="../releasenotes/index.html">Release Information for the ACE
2644 ORB (TAO)</A>''
2645 in the
2646 <A HREF="../releasenotes">TAO/docs/releasenotes</A> directory.
2647 <BR><P>
2648 Just for completeness sake, I'll include some other mailing list entries which were helpful
2649 in getting me started. The following is from <A HREF="mailto:ossama@uci.edu">Ossama Othman</A>.
2651 <BLOCKQUOTE>The stock TAO distribution has support for two transport protocols,
2652 TCP/IP and local namespace sockets (aka Unix Domain sockets). However,
2653 TAO's pluggable protocols framework allows users to add support for
2654 additional transport protocols. All you'd really have to do is
2655 implement a SCRAMNet pluggable transport protocol with the interface
2656 TAO's pluggable protocol framework provides and you'd be able to use
2657 SCRAMNet with TAO just as easily as the IIOP (GIOP over TCP/IP) and
2658 UIOP (GIOP over Unix domains sockets) protocols.
2660 The idea is to implement GIOP messaging over a SCRAMNet transport. If
2661 you model your implementation on TAO's IIOP and UIOP implementations
2662 then it should be fairly straightforward to create a SCRAMNet
2663 pluggable protocol for TAO. The hard part is implementing the
2664 equivalent ACE classes for SCRAMNet.
2666 . . .
2668 It's actually not that bad. The easiest way to add a pluggable protocol
2669 to TAO, IMO, is to base your pluggable protocol on existing ones. As
2670 long as you have the same interface for your protocol as the existing
2671 ones then it is fairly easy to create your TAO pluggable protocol.
2672 However, in order to do that you have to create ACE_SCRAMNet_{Acceptor,
2673 Connector, Stream, Addr} implementations, for example, since TAO's
2674 existing pluggable protocols use those interfaces.
2677 As long as you use the same interface for your protocol as the
2678 interface for ace/ACE_SOCK* and tao/IIOP* then you shouldn't have much
2679 of a problem.
2680 </BLOCKQUOTE>
2683 This also assumes that you're implementation can satisfy the
2684 conditions stated earlier in this document.
2686 <P>Note also that the TAO files pluggable.*
2687 are important to review and understand as they contain the abstract
2688 classes that form the common inteface for TAO's pluggable protocol
2689 framework. <BR> <P>Getting a full understanding on how IIOP was
2690 implemented (GIOP over TCP/IP) and also seeing how provisions were
2691 made to add UIOP, was very helpful to adding my own protocol. In
2692 understanding IIOP, I needed to review the section of the OMG CORBA
2693 spec on GIOP, IIOP and Object references and see how this would apply
2694 to my protocol. <BR>
2696 <P>In my case, I added a transport layer that uses SCRAMNet (from
2697 Systran Corp) replicated shared memory hardware. This is actual
2698 physical memory cards located on two different machines. When a
2699 change is made to one memory then that change appears very quickly
2700 (very low latency here) in the other memory. I decided that I would
2701 implement GIOP over SCRAMNet as this seemed to be the simplest. With
2702 SCRAMNet, one could implement this transport layer for the TAO ORB in
2703 a few different ways, GIOP over SCRAMNet, Environment-specific
2704 inter-ORB protocol (ESIOP) or using collocation (since it is shared
2705 replicated memory). I have not done the latter two, only GIOP over
2706 SCRAMNet just to get a proof of concept working.
2708 <BR><P> For a graphical representation of the extensions for the new
2709 SCRAMNet classes I have may a skeletal Rose diagram showing (at this
2710 point) the inheritance relationships of the new and existing classes.
2711 See (TBD) ftp site for this Rose diagram.
2713 <BR><P>
2714 The new classes created were.
2715 <BR>
2716 <BLOCKQUOTE>
2717 TAO_SCRAMNet_Profile (Derived from TAO_Profile in <A HREF="../../tao/Profile.h">Profile.h</A>)<BR>
2718 TAO_SCRAMNet_Acceptor (Derived from TAO_Acceptor in <A HREF="../../tao/Pluggable.h">Pluggable.h</A>) <BR>
2719 TAO_SCRAMNet_Connector (Derived from TAO_Connector in <A HREF="../../tao/Pluggable.h">Pluggable.h</A>)<BR>
2720 TAO_SCRAMNet_Transport (Derived from TAO_Transport in <A HREF="../../tao/Pluggable.h">Pluggable.h</A>)
2721 <BLOCKQUOTE>TAO_SCRAMNet_Server_Transport<BR>
2722 TAO_SCRAMNet_Client_Transport</BLOCKQUOTE>
2723 TAO_SCRAMNet_Protocol_Factory (Derived from TAO_Protocol Factory in <A HREF="../../tao/Protocol_Factory.h">Protocol_Factory.h</A>)<BR>
2724 TAO_SCRAMNet_Handler_Base (as in <A HREF="../../tao/IIOP_Connect.h">IIOP_Connect.h</A>)
2725 <BLOCKQUOTE>TAO_SCRAMNet_Client_Connection_Handler<BR>
2726 TAO_SCRAMNet_Server_Connection_Handler</BLOCKQUOTE></BLOCKQUOTE>
2727 <BLOCKQUOTE>ACE_SCRAMNet_Addr<BR>
2728 ACE_SCRAMNet_Acceptor<BR>
2729 ACE_SCRAMNet_Connector<BR>
2730 ACE_SCRAMNet_Stream</BLOCKQUOTE>
2731 <P>I closely followed the way that IIOP and UIOP were defined and implemented in the definition and
2732 implementation of the SCRAMNet classes. Following the existing protocol implementation was
2733 the largest source of help for me. Being able to step through the operation of the ORB for
2734 the IIOP protocol and then transposing that over to my protocol made the process relatively painless
2735 and quite the learning experience.
2736 <BR><P>
2738 I am using TAO under Phar Lap's Embedded Tool Suite Real-Time
2739 Operating System which is an RTOS which supports a subset of the Win32
2740 API and Winsock 1.1. Because of the new SCRAMNet transport hardware I
2741 needed to change the ORBs core reactor to a WFMO_Reactor. Any
2742 instance of the TAO ORB can only have one reactor type or it won't
2743 work. In my case I am using an ORB in one thread that uses the
2744 WFMO_Reactor and the SCRAMNet transport, and an ORB in another thread
2745 that uses a Select Reactor and the IIOP protocol. I won't go into
2746 much of the SCRAMNet specific stuff as I assume most people are
2747 interested in adding a pluggable protocol in general. <BR><P>
2751 RE: IORs<BR>
2752 I found that I needed to have a full understanding of what the exact contents of
2753 a TAO-created IOR were as I needed to be able to understand how to decode the
2754 location information that was now written in the IOR with the SCRAMNet
2755 specific information. Decoding of the preconnect and endpoint info is important.
2756 The endpoint info both in the command line arguments and in the IOR are different
2757 for the each protocol and so your implemention of the new classes has to parse this
2758 information correctly.
2759 <BR><P>
2760 In order to create the ORB with the Win32 Reactor at the core as well as the
2761 SCRAMNet protocol factory loaded and initialize I needed to use the
2762 svc.conf file with the the following options
2763 <A HREF="../Options.html#-ORBReactorType">-ORBReactorType</A> wfmo
2764 <A HREF="../Options.html#-ORBProtocolFactory">-ORBProtocolFactory</A> SCRAMNet_Factory
2765 <BR><P>
2767 </OL>
2769 Beyond the above, I just traced through the operation of the IIOP
2770 protocol in action to see exactly where I needed to just graft on the
2771 new ACE_SCRAMNet classes, the TAO_SCRAMNet classes and their
2772 associated implementations for send and recv so that the SCRAMNet
2773 hardware was used as the transport and not the ethernet hardware.
2774 Questions, comments, changes are welcome. I can be reached at <A
2775 HREF="mailto:btrask@contactsystems.com">btrask@contactsystems.com</A>
2778 <HR>
2781 <H3>
2782 <A NAME="SECTION400" HREF="#TOC_SECTION400">
2783 Additional Implementation Information
2784 </A>
2785 </H3>
2788 This section covers additional information not necessarily related to
2789 TAO's pluggable protocol framework but may still be of interest to
2790 pluggable protocol and ORB developers, nevertheless.
2792 <H3>
2793 <A NAME="SECTION410" HREF="#TOC_SECTION410">
2794 Tags
2795 </A>
2796 </H3>
2798 Tags are used to uniquely identify certain parts of an ORB, including
2799 the following:
2801 <UL>
2802 <LI>vendor</LI>
2803 <LI>profile</LI>
2804 <LI>service</LI>
2805 <LI>component</LI>
2806 <LI>ORB type</LI>
2807 </UL>
2809 A list of current <A HREF="http://www.omg.org/">OMG</A> assigned tags
2810 is available at:
2811 <BLOCKQUOTE>
2812 <A HREF="ftp://ftp.omg.org/pub/docs/ptc/99-05-02.txt">ftp://ftp.omg.org/pub/docs/ptc/99-05-02.txt</A>
2813 </BLOCKQUOTE>
2815 For information about tags and tag allocation see:
2816 <BLOCKQUOTE>
2817 <A HREF="http://www.omg.org/cgi-bin/doc?ptc/99-02-01">http://www.omg.org/cgi-bin/doc?ptc/99-02-01</A>
2818 </BLOCKQUOTE>
2821 Information about tags used in TAO is available
2822 <A HREF="../Tags.html">here</A>.
2825 <HR>
2828 <H3><A NAME="SECTION500" HREF="#TOC_SECTION500">
2829 Using a Pluggable Protocol</A>
2830 </H3>
2833 Once a TAO pluggable protocol is implemented, the ORB is told to load it by
2834 adding entries to a <TT>Service Configurator</TT> configuration file (e.g. <TT>svc.conf</TT>
2835 for that protocol. A typical <TT>svc.conf</TT> file could contain entries such
2836 as the following:
2840 <DL COMPACT>
2841 <DT>
2842 <DD>
2843 dynamic&nbsp;FOOIOP_Factory&nbsp;Service_Object&nbsp;*&nbsp;TAO_FOO:_make_TAO_FOOIOP_Protocol_Factory()&nbsp;&#34;&#34;
2844 <BR>
2845 static&nbsp;Resource_Factory&nbsp;&#34;-ORBProtocolFactory&nbsp;FOOIOP_Factory&#34;
2847 </DD>
2848 </DL>These entries would cause a pluggable protocol called ``FOOIOP'' to be loaded
2849 into the ORB. By default the IIOP and UIOP (if supported) pluggable protocols
2850 are loaded into TAO if no such entries are provided. Explicitly specifying which
2851 protocols to load in this way prevents any pluggable protocols from being loaded
2852 by default. The
2853 <TT><A HREF="../Options.html#-ORBProtocolFactory">-ORBProtocolFactory</A></TT>
2854 ORB option causes the specified protocol factory to be loaded into the
2855 ORB.
2857 Multiple pluggable protocols can be loaded simply by adding more
2858 <TT>Service Configurator</TT> configuration file entries. For example, the following
2859 entries would cause the TAO's IIOP and the fictional FOOIOP pluggable protocols
2860 to be loaded:
2864 <DL COMPACT>
2865 <DT>
2866 <DD>dynamic&nbsp;FOOIOP_Factory&nbsp;Service_Object&nbsp;*&nbsp;TAO_FOO:_make_TAO_FOOIOP_Protocol_Factory()&nbsp;&#34;&#34;
2867 <BR>
2868 static&nbsp;Resource_Factory&nbsp;&#34;-ORBProtocolFactory&nbsp;FOOIOP_Factory&#34;
2869 <BR>
2870 dynamic&nbsp;IIOP_Factory&nbsp;Service_Object&nbsp;*&nbsp;TAO:_make_TAO_IIOP_Protocol_Factory()&nbsp;&#34;&#34;&nbsp;&nbsp;
2871 <BR>
2872 static&nbsp;Resource_Factory&nbsp;&#34;-ORBProtocolFactory&nbsp;IIOP_Factory&#34;
2874 </DD>
2875 </DL>In this case, TAO's UIOP pluggable protocol would <I>not</I> be
2876 loaded. <TT>Service Configurator</TT> configuration file names are
2877 not limited to the name ``<TT>svc.conf</TT>.'' The ORB can be told
2878 to use a configuration file other than ``<TT>svc.conf</TT>'' by using the
2879 <TT><A HREF="../Options.html#-ORBSvcConf">-ORBSvcConf</A></TT>
2880 ORB option.
2884 Note that the FOOIOP protocol resides in a library other than the TAO
2885 library, called ``<TT>libTAO_FOO.so</TT>'' on UNIX platforms, and
2886 ``<TT>TAO_FOO.dll</TT>'' on Win32 platforms. This ability to
2887 dynamically load pluggable protocols in libraries that are completely
2888 separate libraries from the TAO library truly makes TAO's pluggable
2889 protocol framework ``pluggable.'' Make sure the directory your
2890 pluggable protocol library is located in is also in your library
2891 search path, typically <TT>LD_LIBRARY_PATH</TT> on UNIX systems and/or
2892 the ``<TT>/etc/ld.so.conf</TT>'' file on some UNIX systems. Remember
2893 to run <TT>ldconfig</TT> if you modify ``<TT>/etc/ld.so.conf</TT>.''
2896 Creating an endpoint specific to a given pluggable protocol is simply a matter
2897 of using TAO's <TT><A HREF="../Options.html#-ORBEndpoint">-ORBEndpoint</A></TT> ORB option. This is detailed in the documentation
2898 for the
2899 <TT><A HREF="#TAO_Acceptor::open">open</A></TT>
2901 <TT><A HREF="#TAO_Acceptor::open_default">open_default</A></TT>
2902 methods in the
2903 <TT><A HREF="#SECTION210">Acceptor</A></TT>
2904 section of this document. Once an endpoint is created, the client uses
2905 the IOR that points to the object on that endpoint to make requests on
2906 that object.
2909 All ORB options are described <A HREF="../Options.html">here</A>.
2912 <HR>
2915 <H3><A NAME="SECTION600" HREF="#TOC_SECTION600">
2916 Bibliography</A>
2917 </H3><DL COMPACT><DD><P></P><DT><A NAME="Schmidt:97c">1</A>
2918 <DD>
2919 D. C. Schmidt,
2920 ``<A HREF=http://www.dre.vanderbilt.edu/~schmidt/PDF/Acc-Con.pdf>
2921 Acceptor and Connector: Design Patterns for Initializing
2922 Communication Services</A>,''
2923 in <EM> Pattern Languages of Program Design</EM>
2924 (R. Martin, F. Buschmann, and D. Riehle, eds.), Reading, MA: Addison-Wesley,
2925 1997.
2927 <P></P><DT><A NAME="Schmidt:97e">2</A>
2928 <DD>
2929 C. Cleeland, D. C. Schmidt and T. Harrison,
2930 ``<A HREF=http://www.dre.vanderbilt.edu/~schmidt/PDF/External-Polymorphism.pdf>
2931 External Polymorphism -- An Object Structural Pattern for
2932 Transparently Extending Concrete Data Types</A>,''
2933 in <EM> Pattern Languages of Program Design</EM>
2934 (R. Martin, F. Buschmann, and D. Riehle, eds.), Reading, MA: Addison-Wesley,
2935 1997.
2937 <P></P><DT><A NAME="Schmidt:94k">3</A>
2938 <DD>
2939 D. C. Schmidt and T. Suda,
2940 ``<A HREF=http://www.dre.vanderbilt.edu/~schmidt/PDF/DSEJ-94.pdf>
2941 An Object-Oriented Framework for Dynamically
2942 Configuring Extensible Distributed Communication Systems</A>,'' <EM> IEE/BCS
2943 Distributed Systems Engineering Journal (Special Issue on Configurable
2944 Distributed Systems)</EM>, vol. 2, pp. 280-293, December 1994.
2946 <P></P><DT><A NAME="Johnson:95a">4</A>
2947 <DD>
2948 H. Hueni, R. Johnson, and R. Engel, ``A Framework for Network Protocol
2949 Software,'' in <EM> Proceedings of OOPSLA '95</EM>, (Austin, Texas), ACM,
2950 October 1995.
2952 <P></P><DT><A NAME="Buschmann:95b">5</A>
2953 <DD>
2954 F. Buschmann, R. Meunier, H. Rohnert, P. Sommerlad, and M. Stal, <A
2955 HREF="http://www.dre.vanderbilt.edu/~schmidt/POSA/">Pattern-Oriented Software
2956 Architecture - A System of Patterns</EM>.</A> Wiley and Sons, 1996.
2958 <P></P><DT><A NAME="Schmidt:99x">6</A>
2959 <DD>
2960 Carlos O'Ryan, Fred Kuhns, Douglas C. Schmidt, Ossama Othman, and Jeff
2961 Parsons, <A
2962 HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/pluggable_protocols.pdf"> The
2963 Design and Performance of a Pluggable Protocols Framework for
2964 Real-time Distributed Object Computing Middleware</A>, Proceedings of
2965 the IFIP/ACM <A
2966 HREF="http://www.research.ibm.com/Middleware2000/">Middleware 2000</A>
2967 Conference, Pallisades, New York, April 3-7, 2000. <P>
2969 <P></P><DT><A NAME="Schmidt:99c">7</A> <DD> Fred Kuhns, Carlos O'Ryan,
2970 Douglas C. Schmidt, Ossama Othman, and Jeff Parsons, <A
2971 HREF="http://www.dre.vanderbilt.edu/~schmidt/PDF/PfHSN.pdf">The Design and
2972 Performance of a Pluggable Protocols Framework for Object Request
2973 Broker Middleware,</A> Proceedings of the <A
2974 HREF="http://www.isi.edu/pfhsn99/call.html">IFIP Sixth International
2975 Workshop on Protocols For High-Speed Networks (PfHSN '99)</A>, Salem,
2976 MA, August 25--27, 1999. <P>
2978 </DL>
2982 <HR><H4>Footnotes</H4>
2983 <DL>
2984 <DT><A NAME="foot549">... abstraction.</A><A NAME="foot549"
2985 HREF="#tex2html5"><SUP>1</SUP></A>
2986 <DD>Protocol stacks based on the Internet or ISO OSI reference models are common
2987 examples of the Layers architecture.
2990 </DL><HR>
2991 <ADDRESS><a href="mailto:ossama@uci.edu">Ossama Othman</a></ADDRESS>
2992 <!-- Created: Tue Dec 14 16:53:58 CST 1999 -->
2993 <!-- hhmts start -->
2994 Last modified: Sat Dec 8 10:43:59 PST 2001
2995 <!-- hhmts end -->
2996 </BODY>
2997 </HTML>