KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)CancelRequestMessage_1_1.java 1.10 03/12/19
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 import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
11
12 /**
13  * This implements the GIOP 1.1 CancelRequest header.
14  *
15  * @author Ram Jeyaraman 05/14/2000
16  * @version 1.0
17  */

18
19 public final class CancelRequestMessage_1_1 extends Message_1_1
20         implements CancelRequestMessage {
21
22     // Instance variables
23

24     private int request_id = (int) 0;
25
26     // Constructors
27

28     CancelRequestMessage_1_1() {}
29
30     CancelRequestMessage_1_1(int _request_id) {
31         super(Message.GIOPBigMagic, GIOPVersion.V1_1, FLAG_NO_FRAG_BIG_ENDIAN,
32             Message.GIOPCancelRequest, CANCEL_REQ_MSG_SIZE);
33         request_id = _request_id;
34     }
35
36     // Accessor methods
37

38     public int getRequestId() {
39         return this.request_id;
40     }
41
42     // IO methods
43

44     public void read(org.omg.CORBA.portable.InputStream JavaDoc istream) {
45         super.read(istream);
46         this.request_id = istream.read_ulong();
47     }
48
49     public void write(org.omg.CORBA.portable.OutputStream JavaDoc ostream) {
50         super.write(ostream);
51         ostream.write_ulong(this.request_id);
52     }
53
54     public void callback(MessageHandler handler)
55         throws java.io.IOException JavaDoc
56     {
57         handler.handleInput(this);
58     }
59 } // class CancelRequestMessage_1_1
60
Popular Tags