KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CORBA > ServiceInformationHolder


1 /*
2  * @(#)ServiceInformationHolder.java 1.15 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 org.omg.CORBA;
9
10 /**
11  * The Holder for <tt>ServiceInformation</tt>. For more information on
12  * Holder files, see <a HREF="doc-files/generatedfiles.html#holder">
13  * "Generated Files: Holder Files"</a>.<P>
14  * A Holder class for a <code>ServiceInformation</code> object
15  * that is used to store "out" and "inout" parameters in IDL methods.
16  * If an IDL method signature has an IDL <code>xxx</code> as an "out"
17  * or "inout" parameter, the programmer must pass an instance of
18  * <code>ServiceInformationHolder</code> as the corresponding
19  * parameter in the method invocation; for "inout" parameters, the programmer
20  * must also fill the "in" value to be sent to the server.
21  * Before the method invocation returns, the ORB will fill in the
22  * value corresponding to the "out" value returned from the server.
23  * <P>
24  * If <code>myServiceInformationHolder</code> is an instance of <code>ServiceInformationHolder</code>,
25  * the value stored in its <code>value</code> field can be accessed with
26  * <code>myServiceInformationHolder.value</code>.
27  */

28 public final class ServiceInformationHolder
29     implements org.omg.CORBA.portable.Streamable JavaDoc {
30
31     /**
32      * The <code>ServiceInformation</code> value held by this
33      * <code>ServiceInformationHolder</code> object in its <code>value</code> field.
34      */

35     public ServiceInformation JavaDoc value;
36
37     /**
38      * Constructs a new <code>ServiceInformationHolder</code> object with its
39      * <code>value</code> field initialized to null.
40      */

41     public ServiceInformationHolder() {
42         this(null);
43     }
44     
45     /**
46      * Constructs a new <code>ServiceInformationHolder</code> object with its
47      * <code>value</code> field initialized to the given
48      * <code>ServiceInformation</code> object.
49      *
50      * @param arg the <code>ServiceInformation</code> object with which to initialize
51      * the <code>value</code> field of the newly-created
52      * <code>ServiceInformationHolder</code> object
53      */

54     public ServiceInformationHolder(org.omg.CORBA.ServiceInformation JavaDoc arg) {
55         value = arg;
56     }
57
58
59     /**
60      * Marshals the value in this <code>ServiceInformationHolder</code> object's
61      * <code>value</code> field to the output stream <code>out</code>.
62      *
63      * @param out the <code>OutputStream</code> object that will contain
64      * the CDR formatted data
65      */

66     public void _write(org.omg.CORBA.portable.OutputStream JavaDoc out) {
67         org.omg.CORBA.ServiceInformationHelper.write(out, value);
68     }
69
70     /**
71      * Reads unmarshalled data from the input stream <code>in</code> and assigns it to
72      * the <code>value</code> field in this <code>ServiceInformationHolder</code> object.
73      *
74      * @param in the <code>InputStream</code> object containing CDR
75      * formatted data from the wire
76      */

77     public void _read(org.omg.CORBA.portable.InputStream JavaDoc in) {
78         value = org.omg.CORBA.ServiceInformationHelper.read(in);
79     }
80
81     /**
82      * Retrieves the <code>TypeCode</code> object that corresponds
83      * to the value held in this <code>ServiceInformationHolder</code> object's
84      * <code>value</code> field.
85      *
86      * @return the type code for the value held in this <code>ServiceInformationHolder</code>
87      * object
88      */

89     public org.omg.CORBA.TypeCode JavaDoc _type() {
90         return org.omg.CORBA.ServiceInformationHelper.type();
91     }
92 }
93
94
Popular Tags