FileDocCategorySizeDatePackage
CurrentHelper.javaAPI DocJava SE 5 API3010Fri Aug 26 14:58:36 BST 2005org.omg.PortableServer

CurrentHelper

public abstract class CurrentHelper extends Object
The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked. The Current interface is provided to support servants that implement multiple objects, but can be used within the context of POA-dispatched method invocations on any servant. To provide location transparency, ORBs are required to support use of Current in the context of both locally and remotely invoked operations. An instance of Current can be obtained by the application by issuing the CORBA::ORB::resolve_initial_references("POACurrent") operation. Thereafter, it can be used within the context of a method dispatched by the POA to obtain the POA and ObjectId that identify the object on which that operation was invoked.

Fields Summary
private static String
_id
private static org.omg.CORBA.TypeCode
__typeCode
Constructors Summary
Methods Summary
public static org.omg.PortableServer.Currentextract(org.omg.CORBA.Any a)

        return read (a.create_input_stream ());
    
public static java.lang.Stringid()

        return _id;
    
public static voidinsert(org.omg.CORBA.Any a, org.omg.PortableServer.Current that)


          
         
    
        org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
        a.type (type ());
        write (out, that);
        a.read_value (out.create_input_stream (), type ());
    
public static org.omg.PortableServer.Currentnarrow(org.omg.CORBA.Object obj)

        if (obj == null)
            return null;
        else if (obj instanceof org.omg.PortableServer.Current)
            return (org.omg.PortableServer.Current)obj;
        else if (!obj._is_a (id ()))
            throw new org.omg.CORBA.BAD_PARAM ();
        return null;
    
public static org.omg.PortableServer.Currentread(org.omg.CORBA.portable.InputStream istream)

        throw new org.omg.CORBA.MARSHAL ();
    
public static synchronized org.omg.CORBA.TypeCodetype()

         
    
        if (__typeCode == null)
        {
            __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (
                org.omg.PortableServer.CurrentHelper.id (), "Current");
        }
        return __typeCode;
    
public static voidwrite(org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableServer.Current value)

        throw new org.omg.CORBA.MARSHAL ();