1 package org.jacorb.orb.giop; 2 3 22 23 import org.jacorb.orb.ParsedIOR; 24 import org.omg.CORBA.MARSHAL ; 25 import org.omg.GIOP.*; 26 27 33 34 public class LocateRequestInputStream 35 extends MessageInputStream 36 { 37 public LocateRequestHeader_1_2 req_hdr = null; 38 39 public LocateRequestInputStream( org.omg.CORBA.ORB orb, byte[] buf ) 40 { 41 super( orb, buf ); 42 43 if( Messages.getMsgType( buffer ) == MsgType_1_1._LocateRequest ) 44 { 45 switch( giop_minor ) 46 { 47 case 0 : 48 { 49 } 51 case 1 : 52 { 53 LocateRequestHeader_1_0 locate_req_hdr = 55 LocateRequestHeader_1_0Helper.read( this ); 56 57 TargetAddress addr = new TargetAddress(); 58 addr.object_key( locate_req_hdr.object_key ); 59 60 req_hdr = 61 new LocateRequestHeader_1_2( locate_req_hdr.request_id, 62 addr ); 63 break; 64 } 65 case 2 : 66 { 67 req_hdr = 69 LocateRequestHeader_1_2Helper.read( this ); 70 71 72 break; 73 } 74 default : 75 { 76 throw new MARSHAL ("Unknown GIOP minor version: " + giop_minor); 77 } 78 } 79 } 80 else 81 { 82 throw new MARSHAL ("Not a Locate request!"); 83 } 84 } 85 86 protected void finalize() throws Throwable 87 { 88 try 89 { 90 close(); 91 } 92 catch( java.io.IOException iox ) 93 { 94 } 96 finally 97 { 98 super.finalize(); 99 } 100 } 101 } 102 | Popular Tags |