CORBA 2.3.3 Programmer's Guide for C++

Caution
Although you should refer to the NonStop DCE Application Programming Manual for information about the NonStop
DCE procedures, do not use the libraries provided by the NonStop DCE product; doing so may interfere with the
operation of the NonStop CORBA ORB. Instead, use the version of the pthread.h header file provided in the
$NSD_ROOT/include directory, which includes the NonStop DCE procedures and all necessary underlying routines.
Writing a Wrapper for a Legacy Client
A legacy client wrapper accepts requests from a non-CORBA client and forwards them to a CORBA server. The
wrapper transforms legacy-system requests into CORBA operation invocations and CORBA completions into
legacy-system replies.
From the client's perspective, the wrapper is a legacy server. From the CORBA server's perspective, the wrapper is a
CORBA client. Thus, the client wrapper acts as a bridge between a legacy client and a CORBA server, as shown in
Figure 122 .
Figure 11.2. Legacy Client Wrapper
Basic Structure of a Client Wrapper
The basic programming mechanism you use in a client wrapper is the same regardless of the transport mechanism and
regardless of whether you use waited or nowait communication. Client wrappers must use the object-oriented interfaces
(APIs) to the NonStop CORBA event framework. If you are writing a client wrapper, you should refer to The NonStop
CORBA Event Framework APIs for background information.
A NonStop CORBA server acting as a client wrapper receives requests from legacy clients in the form of I/O events from
the underlying NonStop CORBA event framework. The client wrapper uses object interfaces provided by the event
framework to retrieve the data and to reply to the client's messages. Using the event framework APIs, the client wrapper
provides two functions: listener event handler and server event handler. A listener event handler establishes and
maintains connections between legacy clients and NonStop CORBA servers. A server event handler transfers data
across such a connection after the connection is established.
NonStop CORBA provides various types of listener and server event-handler objects to support transport functions such
as I/O completions and error handling. If possible, your client wrapper should use these event handlers, thus acting as a
listener event-handler user and a server event-handler user. In some cases, however, the semantics used by your
legacy client may require that you implement your own event handler.
Writing a Client Wrapper for a Context-Free Pathsend Requester
Note
In documentation for TS/MP and related products, Pathsend clients are referred to as Pathsend requesters.
The client wrapper must cooperate with the NonStop CORBA event framework to perform its tasks. It uses two objects, a
factory and a servant (worker), for this cooperative processing. The factory is a listener event-handler user, and the
worker is a server event-handler user.