/** * Locator interface */ interface ServiceLocator { /** * Operation - locate * This operation will return the object group reference of the ObjectGroup named by the * ObjectGroupName or throw a ObjectGroupNotFound exception if the name is not recognised. */ PortableGroup::ObjectGroup locate (in ObjectGroupName group) raises (PortableGroup::ObjectGroupNotFound); /** * Attribute - fallback * If this attribute is not nil then the Locator will try the ::locate on this Locator * instead of raising ObjectGroupNotFound. */ attribute ServiceLocator fallback; }; /** * RequestDecoder * A request decoder provides a portable way to provide a mechanism to extract * the ObjectGroupName from a CORBA Request. These can be plugged in at any PI * request inerception point to provide ObjectGroup location capabilities. * It is envisaged that ORB / service implementors will provide a mechanism for * application developers to register an ordered list of these to provide location * capabilities (see Locator). */ local interface RequestDecoder { // From the given request extract the ObjectGroupName boolean get_name_from_request (in PortableInterceptor::RequestInfo request, out ObjectGroupName group_name); }; /* Used to decode an ObjectKey into its constituent ObjectGroupName contents so that they can be used to identify which replication group the requested Object belongs to. Could also be used to portably plug in other schemes - e.g. dance / CCM offline object reference plan / component / port etc... schemes. */ interface ObjectKeyDecoder { readonly attribute unsigned long vendor_orb_id; boolean get_name_from_key (in CORBA::OctetSeq object_key, out ObjectGroupName group_name); }; local interface ObjectKeyRequestDecoder : RequestDecoder { attribute ObjectKeyDecoder object_key_decoder; }; /** * ForwardingLocator */ interface ForwardingServiceLocator : ServiceLocator { /** * Pseudo operations * * PortableGroup::ObjectGroup FT_Locate (); * Requests made to FT_Locate should invoke any registered RequestDecoders * and will then call ::locate returning the located object to the caller. * * * Will invoke any registered RequestDecoders and will then call ::locate * returning a LOCATION_FORWARD response to the located object to the caller. */ };