1 7 8 package com.sun.corba.se.impl.protocol.giopmsgheaders; 9 10 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 11 12 import com.sun.corba.se.spi.orb.ORB; 13 14 import com.sun.corba.se.spi.ior.ObjectKey; 15 16 22 23 public final class LocateRequestMessage_1_1 extends Message_1_1 24 implements LocateRequestMessage { 25 26 28 private ORB orb = null; 29 private int request_id = (int) 0; 30 private byte[] object_key = null; 31 private ObjectKey objectKey = null; 32 33 35 LocateRequestMessage_1_1(ORB orb) { 36 this.orb = orb; 37 } 38 39 LocateRequestMessage_1_1(ORB orb, int _request_id, byte[] _object_key) { 40 super(Message.GIOPBigMagic, GIOPVersion.V1_1, FLAG_NO_FRAG_BIG_ENDIAN, 41 Message.GIOPLocateRequest, 0); 42 this.orb = orb; 43 request_id = _request_id; 44 object_key = _object_key; 45 } 46 47 49 public int getRequestId() { 50 return this.request_id; 51 } 52 53 public ObjectKey getObjectKey() { 54 if (this.objectKey == null) { 55 this.objectKey = MessageBase.extractObjectKey(object_key, orb); 57 } 58 59 return this.objectKey; 60 } 61 62 64 public void read(org.omg.CORBA.portable.InputStream istream) { 65 super.read(istream); 66 this.request_id = istream.read_ulong(); 67 int _len1 = istream.read_long(); 68 this.object_key = new byte[_len1]; 69 istream.read_octet_array(this.object_key, 0, _len1); 70 } 71 72 public void write(org.omg.CORBA.portable.OutputStream ostream) { 73 super.write(ostream); 74 ostream.write_ulong(this.request_id); 75 nullCheck(this.object_key); 76 ostream.write_long(this.object_key.length); 77 ostream.write_octet_array(this.object_key, 0, this.object_key.length); 78 } 79 80 public void callback(MessageHandler handler) 81 throws java.io.IOException 82 { 83 handler.handleInput(this); 84 } 85 } | Popular Tags |