1 package org.jacorb.orb.giop; 2 3 22 23 import java.io.*; 24 import org.omg.CORBA.MARSHAL ; 25 import org.omg.GIOP.*; 26 import org.jacorb.orb.*; 27 28 33 34 public class LocateRequestOutputStream 35 extends MessageOutputStream 36 { 37 private int request_id = -1; 38 39 public LocateRequestOutputStream( byte[] object_key, 40 int request_id, 41 int giop_minor ) 42 { 43 super(); 44 45 this.request_id = request_id; 46 47 setGIOPMinor( giop_minor ); 48 49 writeGIOPMsgHeader( MsgType_1_1._LocateRequest, giop_minor ); 50 51 switch( giop_minor ) 52 { 53 case 0 : 54 { 55 } 57 case 1 : 58 { 59 LocateRequestHeader_1_0 req_hdr = 61 new LocateRequestHeader_1_0( request_id, object_key ); 62 63 LocateRequestHeader_1_0Helper.write( this, req_hdr ); 64 65 break; 66 } 67 case 2 : 68 { 69 TargetAddress addr = new TargetAddress(); 71 addr.object_key( object_key ); 72 73 LocateRequestHeader_1_2 req_hdr = 74 new LocateRequestHeader_1_2( request_id, addr ); 75 76 LocateRequestHeader_1_2Helper.write( this, req_hdr ); 77 78 break; 79 } 80 default : 81 { 82 throw new MARSHAL ( "Unknown GIOP minor: " + giop_minor ); 83 } 84 } 85 } 86 87 public int getRequestId() 88 { 89 return request_id; 90 } 91 } 92 | Popular Tags |