KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > naming > namingutil > IIOPEndpointInfo


1 /*
2  * @(#)IIOPEndpointInfo.java 1.6 05/01/04
3  *
4  * Copyright 2005 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.naming.namingutil;
9
10 import com.sun.corba.se.impl.orbutil.ORBConstants;
11
12 /**
13  * EndpointInfo is used internally by CorbaLoc object to store the
14  * host information used in creating the Service Object reference
15  * from the -ORBInitDef and -ORBDefaultInitDef definitions.
16  *
17  * @Author Hemanth
18  */

19 public class IIOPEndpointInfo
20 {
21     // Version information
22
private int major, minor;
23
24     // Host Name and Port Number
25
private String JavaDoc host;
26     private int port;
27
28     IIOPEndpointInfo( ) {
29     // Default IIOP Version
30
major = ORBConstants.DEFAULT_INS_GIOP_MAJOR_VERSION;
31     minor = ORBConstants.DEFAULT_INS_GIOP_MINOR_VERSION;
32     // Default host is localhost
33
host = ORBConstants.DEFAULT_INS_HOST;
34     // Default INS Port
35
port = ORBConstants.DEFAULT_INS_PORT;
36     }
37
38     public void setHost( String JavaDoc theHost ) {
39     host = theHost;
40     }
41
42     public String JavaDoc getHost( ) {
43     return host;
44     }
45
46     public void setPort( int thePort ) {
47     port = thePort;
48     }
49
50     public int getPort( ) {
51     return port;
52     }
53
54     public void setVersion( int theMajor, int theMinor ) {
55     major = theMajor;
56     minor = theMinor;
57     }
58
59     public int getMajor( ) {
60     return major;
61     }
62
63     public int getMinor( ) {
64     return minor;
65     }
66
67     /** Internal Debug Method.
68      */

69     public void dump( ) {
70     System.out.println( " Major -> " + major + " Minor -> " + minor );
71     System.out.println( "host -> " + host );
72     System.out.println( "port -> " + port );
73     }
74 }
75
76
Popular Tags