FileDocCategorySizeDatePackage
RequestMessage_1_1.javaAPI DocJava SE 5 API5070Fri Aug 26 14:54:32 BST 2005com.sun.corba.se.impl.protocol.giopmsgheaders

RequestMessage_1_1

public final class RequestMessage_1_1 extends Message_1_1 implements RequestMessage
This implements the GIOP 1.1 Request header.
author
Ram Jeyaraman 05/14/2000
version
1.0

Fields Summary
private ORB
orb
private ORBUtilSystemException
wrapper
private ServiceContexts
service_contexts
private int
request_id
private boolean
response_expected
private byte[]
reserved
private byte[]
object_key
private String
operation
private Principal
requesting_principal
private ObjectKey
objectKey
Constructors Summary
RequestMessage_1_1(ORB orb)


    // Constructors

      
        this.orb = orb;
	this.wrapper = ORBUtilSystemException.get( orb,
	    CORBALogDomains.RPC_PROTOCOL ) ;
    
RequestMessage_1_1(ORB orb, ServiceContexts _service_contexts, int _request_id, boolean _response_expected, byte[] _reserved, byte[] _object_key, String _operation, Principal _requesting_principal)

        super(Message.GIOPBigMagic, GIOPVersion.V1_1, FLAG_NO_FRAG_BIG_ENDIAN,
            Message.GIOPRequest, 0);
        this.orb = orb;
	this.wrapper = ORBUtilSystemException.get( orb,
	    CORBALogDomains.RPC_PROTOCOL ) ;
        service_contexts = _service_contexts;
        request_id = _request_id;
        response_expected = _response_expected;
        reserved = _reserved;
        object_key = _object_key;
        operation = _operation;
        requesting_principal = _requesting_principal;
    
Methods Summary
public voidcallback(com.sun.corba.se.impl.protocol.giopmsgheaders.MessageHandler handler)

        handler.handleInput(this);
    
public com.sun.corba.se.spi.ior.ObjectKeygetObjectKey()

        if (this.objectKey == null) {
	    // this will raise a MARSHAL exception upon errors.
	    this.objectKey = MessageBase.extractObjectKey(object_key, orb);
        }

	return this.objectKey;
    
public java.lang.StringgetOperation()

        return this.operation;
    
public org.omg.CORBA.PrincipalgetPrincipal()

        return this.requesting_principal;
    
public intgetRequestId()

        return this.request_id;
    
public byte[]getReserved()

        return this.reserved;
    
public com.sun.corba.se.spi.servicecontext.ServiceContextsgetServiceContexts()

        return this.service_contexts;
    
public booleanisResponseExpected()

        return this.response_expected;
    
public voidread(org.omg.CORBA.portable.InputStream istream)

        super.read(istream);
        this.service_contexts 
            = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
        this.request_id = istream.read_ulong();
        this.response_expected = istream.read_boolean();
        this.reserved = new byte[3];
        for (int _o0 = 0;_o0 < (3); ++_o0) {
            this.reserved[_o0] = istream.read_octet();
        }
        int _len1 = istream.read_long();
        this.object_key = new byte[_len1];
        istream.read_octet_array(this.object_key, 0, _len1);
        this.operation = istream.read_string();
        this.requesting_principal = istream.read_Principal();
    
public voidwrite(org.omg.CORBA.portable.OutputStream ostream)

        super.write(ostream);
        if (this.service_contexts != null) {
	        service_contexts.write(
                (org.omg.CORBA_2_3.portable.OutputStream) ostream,
                GIOPVersion.V1_1);
	    } else {
	        ServiceContexts.writeNullServiceContext(
                (org.omg.CORBA_2_3.portable.OutputStream) ostream);
        }
        ostream.write_ulong(this.request_id);
        ostream.write_boolean(this.response_expected);
        nullCheck(this.reserved);
        if (this.reserved.length != (3)) {
	    throw wrapper.badReservedLength( 
		org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
        }
        for (int _i0 = 0;_i0 < (3); ++_i0) {
            ostream.write_octet(this.reserved[_i0]);
        }
        nullCheck(this.object_key);
        ostream.write_long(this.object_key.length);
        ostream.write_octet_array(this.object_key, 0, this.object_key.length);
        ostream.write_string(this.operation);
        if (this.requesting_principal != null) {
            ostream.write_Principal(this.requesting_principal);
        } else {
            ostream.write_long(0);
        }