1 7 8 package com.sun.corba.se.impl.protocol.giopmsgheaders; 9 10 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 11 12 18 19 public final class FragmentMessage_1_2 extends Message_1_2 20 implements FragmentMessage { 21 22 24 FragmentMessage_1_2() {} 25 26 FragmentMessage_1_2(int _request_id) { 28 super(Message.GIOPBigMagic, GIOPVersion.V1_2, FLAG_NO_FRAG_BIG_ENDIAN, 29 Message.GIOPFragment, 0); 30 this.message_type = GIOPFragment; 31 request_id = _request_id; 32 } 33 34 FragmentMessage_1_2(Message_1_1 msg12) { 35 this.magic = msg12.magic; 36 this.GIOP_version = msg12.GIOP_version; 37 this.flags = msg12.flags; 38 this.message_type = GIOPFragment; 39 this.message_size = 0; 40 41 switch (msg12.message_type) { 42 case GIOPRequest : 43 this.request_id = ((RequestMessage) msg12).getRequestId(); 44 break; 45 case GIOPReply : 46 this.request_id = ((ReplyMessage) msg12).getRequestId(); 47 break; 48 case GIOPLocateRequest : 49 this.request_id = ((LocateRequestMessage) msg12).getRequestId(); 50 break; 51 case GIOPLocateReply : 52 this.request_id = ((LocateReplyMessage) msg12).getRequestId(); 53 break; 54 case GIOPFragment : 55 this.request_id = ((FragmentMessage) msg12).getRequestId(); 56 break; 57 } 58 } 59 60 62 public int getRequestId() { 63 return this.request_id; 64 } 65 66 public int getHeaderLength() { 67 return GIOPMessageHeaderLength + 4; 68 } 69 70 72 76 public void read(org.omg.CORBA.portable.InputStream istream) { 77 super.read(istream); 78 this.request_id = istream.read_ulong(); 79 } 80 81 public void write(org.omg.CORBA.portable.OutputStream ostream) { 82 super.write(ostream); 83 ostream.write_ulong(this.request_id); 84 } 85 86 public void callback(MessageHandler handler) 87 throws java.io.IOException 88 { 89 handler.handleInput(this); 90 } 91 } | Popular Tags |