KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ve > luz > ica > jackass > ref > IORData


1 /*
2  * Copyright (c) 2003 by The Jackass Team
3  * Licensed under the Open Software License version 2.0
4  */

5 package ve.luz.ica.jackass.ref;
6
7 import org.omg.IOP.IOR JavaDoc;
8 import org.omg.IIOP.ProfileBody_1_1;
9
10 /**
11  * Data about a CORBA reference
12  */

13 final class IORData
14 {
15     final IOR JavaDoc ior; ///< The IOR associated to the reference
16
final ProfileBody_1_1 profileBody; ///< The ProfileBody (1.1) of the reference
17
final int inetProfileIndex; ///< The index in the IOR where the ProfileBody belongs
18

19     /**
20      * Creates an IORData object with information about an IIOP 1.1
21      * or later reference.
22      * @param ior interoperable object reference.
23      * @param body profile body for IIOP 1.1 or later.
24      * @param index index of the IIOP profile body in the ior.
25      */

26     IORData(IOR JavaDoc ior, ProfileBody_1_1 body, int index)
27     {
28         this.ior = ior;
29         this.profileBody = body;
30         this.inetProfileIndex = index;
31     }
32
33     /**
34      * Creates an IORData object with informaion about a non-IIOP 1.1
35      * or later reference.
36      * @param ior non-IIOP 1.1 or later reference.
37      */

38     IORData(IOR JavaDoc ior)
39     {
40         this.ior = ior;
41         this.inetProfileIndex = -1;
42         this.profileBody = null;
43     }
44
45     /**
46      * Determines if the reference is IIOP 1.1 or later.
47      * This is true only if the profile body is not null.
48      * @return true if the reference is IIOP 1.1 or later, false otherwise.
49      */

50     boolean isIIOP_1_1()
51     {
52         return profileBody != null;
53     }
54 }
55
Popular Tags