KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > protocol > giopmsgheaders > FragmentMessage_1_1


1 /*
2  * @(#)FragmentMessage_1_1.java 1.10 04/06/21
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.protocol.giopmsgheaders;
9
10 /**
11  * This implements the GIOP 1.1 Fragment header.
12  *
13  * @author Ram Jeyaraman 05/14/2000
14  * @version 1.0
15  */

16
17 public final class FragmentMessage_1_1 extends Message_1_1
18         implements FragmentMessage {
19
20     // Constructors
21

22     FragmentMessage_1_1() {}
23
24     FragmentMessage_1_1(Message_1_1 msg11) {
25         this.magic = msg11.magic;
26         this.GIOP_version = msg11.GIOP_version;
27         this.flags = msg11.flags;
28         this.message_type = GIOPFragment;
29         this.message_size = 0;
30     }
31
32     // Accessor methods
33

34     public int getRequestId() {
35         return -1; // 1.1 has no fragment header and so no request_id
36
}
37
38     public int getHeaderLength() {
39         return GIOPMessageHeaderLength;
40     }
41
42     // IO methods
43

44     /* This will never be called, since we do not currently read the
45      * request_id from an CDRInputStream. Instead we use the
46      * readGIOP_1_1_requestId to read the requestId from a byte buffer.
47      */

48     public void read(org.omg.CORBA.portable.InputStream JavaDoc istream) {
49         super.read(istream);
50     }
51
52     /* 1.1 has no request_id; so nothing to write */
53     public void write(org.omg.CORBA.portable.OutputStream JavaDoc ostream) {
54         super.write(ostream);
55     }
56
57     public void callback(MessageHandler handler)
58         throws java.io.IOException JavaDoc
59     {
60         handler.handleInput(this);
61     }
62 } // class FragmentMessage_1_1
63
Popular Tags