1 7 8 package com.sun.corba.se.impl.protocol.giopmsgheaders; 9 10 import com.sun.corba.se.spi.ior.ObjectKey; 11 12 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 13 import com.sun.corba.se.spi.orb.ORB; 14 15 21 22 public final class LocateRequestMessage_1_2 extends Message_1_2 23 implements LocateRequestMessage { 24 25 27 private ORB orb = null; 28 private ObjectKey objectKey = null; 29 private TargetAddress target = null; 30 31 33 LocateRequestMessage_1_2(ORB orb) { 34 this.orb = orb; 35 } 36 37 LocateRequestMessage_1_2(ORB orb, int _request_id, TargetAddress _target) { 38 super(Message.GIOPBigMagic, GIOPVersion.V1_2, FLAG_NO_FRAG_BIG_ENDIAN, 39 Message.GIOPLocateRequest, 0); 40 this.orb = orb; 41 request_id = _request_id; 42 target = _target; 43 } 44 45 47 public int getRequestId() { 48 return this.request_id; 49 } 50 51 public ObjectKey getObjectKey() { 52 if (this.objectKey == null) { 53 this.objectKey = MessageBase.extractObjectKey(target, orb); 55 } 56 57 return this.objectKey; 58 } 59 60 62 public void read(org.omg.CORBA.portable.InputStream istream) { 63 super.read(istream); 64 this.request_id = istream.read_ulong(); 65 this.target = TargetAddressHelper.read(istream); 66 getObjectKey(); } 68 69 public void write(org.omg.CORBA.portable.OutputStream ostream) { 70 super.write(ostream); 71 ostream.write_ulong (this.request_id); 72 nullCheck(this.target); 73 TargetAddressHelper.write(ostream, this.target); 74 } 75 76 public void callback(MessageHandler handler) 77 throws java.io.IOException 78 { 79 handler.handleInput(this); 80 } 81 } | Popular Tags |