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

RequestMessage_1_0

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

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


    // Constructor

      
        this.orb = orb;
    
RequestMessage_1_0(ORB orb, ServiceContexts _service_contexts, int _request_id, boolean _response_expected, byte[] _object_key, String _operation, Principal _requesting_principal)

        super(Message.GIOPBigMagic, false, Message.GIOPRequest, 0);
        this.orb = orb;
        service_contexts = _service_contexts;
        request_id = _request_id;
        response_expected = _response_expected;
        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()

        // REVISIT Should we throw an exception or return null ?
        return null;
    
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();
        int _len0 = istream.read_long();
        this.object_key = new byte[_len0];
        istream.read_octet_array(this.object_key, 0, _len0);
        this.operation = istream.read_string();
        this.requesting_principal = istream.read_Principal();
    
public voidsetThreadPoolToUse(int poolToUse)

	// No-op, must be GIOP Version 1.1 or greater
	// to support this SUN PROPRIETARY EXTENSION.
    
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_0);
	    } 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.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);
        }