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

LocateReplyMessage_1_1

public final class LocateReplyMessage_1_1 extends Message_1_1 implements LocateReplyMessage
This implements the GIOP 1.1 LocateReply header.
author
Ram Jeyaraman 05/14/2000
version
1.0

Fields Summary
private com.sun.corba.se.spi.orb.ORB
orb
private int
request_id
private int
reply_status
private com.sun.corba.se.spi.ior.IOR
ior
Constructors Summary
LocateReplyMessage_1_1(com.sun.corba.se.spi.orb.ORB orb)


    // Constructors

      
        this.orb = orb;
    
LocateReplyMessage_1_1(com.sun.corba.se.spi.orb.ORB orb, int _request_id, int _reply_status, com.sun.corba.se.spi.ior.IOR _ior)

        super(Message.GIOPBigMagic, GIOPVersion.V1_1, FLAG_NO_FRAG_BIG_ENDIAN,
            Message.GIOPLocateReply, 0);
        this.orb = orb;
        request_id = _request_id;
        reply_status = _reply_status;
        ior = _ior;
    
Methods Summary
public voidcallback(MessageHandler handler)

        handler.handleInput(this);
    
public shortgetAddrDisposition()

        return KeyAddr.value;
    
public com.sun.corba.se.spi.ior.IORgetIOR()

        return this.ior;
    
public intgetReplyStatus()

        return this.reply_status;
    
public intgetRequestId()

        return this.request_id;
    
public org.omg.CORBA.SystemExceptiongetSystemException(java.lang.String message)

        return null; // 1.0 LocateReply body does not contain SystemException
    
public static voidisValidReplyStatus(int replyStatus)

        switch (replyStatus) {
        case UNKNOWN_OBJECT :
        case OBJECT_HERE :
        case OBJECT_FORWARD :
            break;
        default :
	    ORBUtilSystemException localWrapper = ORBUtilSystemException.get( 
		CORBALogDomains.RPC_PROTOCOL ) ;
	    throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
        }
    
public voidread(org.omg.CORBA.portable.InputStream istream)

        super.read(istream);
        this.request_id = istream.read_ulong();
        this.reply_status = istream.read_long();
        isValidReplyStatus(this.reply_status); // raises exception on error

        // The code below reads the reply body if status is OBJECT_FORWARD
        if (this.reply_status == OBJECT_FORWARD) {
            CDRInputStream cdr = (CDRInputStream) istream;
	    this.ior = IORFactories.makeIOR( cdr ) ;
        }
    
public voidwrite(org.omg.CORBA.portable.OutputStream ostream)

        super.write(ostream);
        ostream.write_ulong(this.request_id);
        ostream.write_long(this.reply_status);