KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > iiop > AlternateIIOPAddressComponent


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /**
25 * AlternateIIOPAddressComponent.java .
26 * Generated by the IDL-to-Java compiler (portable), version "3.1"
27 * from iorintsockfact.idl and then modified by hand for package
28 * name, equals and toString.
29 * Tuesday, July 23, 2002 11:08:46 AM PDT
30 */

31
32 package com.sun.enterprise.iiop;
33
34 public final class AlternateIIOPAddressComponent implements org.omg.CORBA.portable.IDLEntity JavaDoc
35 {
36   public static final int TAG_ALTERNATE_IIOP_ADDRESS_ID = 89374;
37   public String JavaDoc host = null;
38   public short port = (short)0;
39
40   public AlternateIIOPAddressComponent ()
41   {
42   } // ctor
43

44   public AlternateIIOPAddressComponent (String JavaDoc _host, short _port)
45   {
46     host = _host;
47     port = _port;
48   } // ctor
49

50     public boolean equals(Object JavaDoc o)
51     {
52     if (o == null) {
53         return false;
54     }
55     if (! (o instanceof AlternateIIOPAddressComponent)) {
56         return false;
57     }
58     AlternateIIOPAddressComponent other = (AlternateIIOPAddressComponent)o;
59     if (other.port != port) {
60         return false;
61     }
62     if (! other.host.equals(host)) {
63         return false;
64     }
65     return true;
66     }
67
68     public String JavaDoc toString()
69     {
70     return "AlternateIIOPAddressComponent[" + host + " " + port + "]";
71     }
72
73 } // class AlternateIIOPAddressComponent
74
Popular Tags