Previous Table of Contents Next


22.14 Message Routing

   The messaging Routers serve two main purposes:

   This section explains the interfaces and mechanisms that support these two functions of Routers. The interfaces described here are not exposed to the application programmer in any way. They are intended entirely for use by Messaging vendors to support interoperability between messaging implementations.

   The following IDL is used to route asynchronous requests and their corresponding replies:

   // IDL module Messaging {

   interface ReplyHandler { }; };

   module MessageRouting {

   struct MessageBody {sequence<octet> body;boolean byte_order;

   };

   struct RequestMessage {GIOP::Version giop_version;IOP::ServiceContextList service_contexts;octet response_flags;octet reserved[3];sequence<octet> object_key;string operation;MessageBody body;

   };

   enum ReplyDisposition { TYPED, UNTYPED };

   struct ReplyDestination {ReplyDisposition handler_type;Messaging::ReplyHandler handler;

   };

   interface Router;typedef sequence<Router> RouterList;struct RequestInfo {

   RouterList visited;RouterList to_visit;Object target;unsigned short profile_index;ReplyDestination reply_destination;Messaging::PolicyValueSeq selected_qos;RequestMessage payload;

   };typedef sequence<RequestInfo> RequestInfoSeq;

   interface Router { void send_request(in RequestInfo req); void send_multiple_requests(in RequestInfoSeq reqSeq);

   };

   //// Polling-related interfaces//

   interface UntypedReplyHandler : Messaging::ReplyHandler { void reply( in string operation_name,

   in GIOP::ReplyStatusType reply_type, in MessageBody reply_body); };

   exception ReplyNotAvailable { };

   interface PersistentRequest { readonly attribute boolean reply_available;

   GIOP::ReplyStatusType get_reply( in boolean blocking, in unsigned long timeout, out MessageBody reply_body)

   raises (ReplyNotAvailable);

   attribute Messaging::ReplyHandler associated_handler; };

   interface PersistentRequestRouter {

   PersistentRequest create_persistent_request( in unsigned short profile_index, in RouterList to_visit, in Object target, in CORBA::PolicyList current_qos, in RequestMessage payload);

   };};