1. /*
  2. * @(#)IIOPEndpointInfo.java 1.4 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. package com.sun.corba.se.impl.naming.namingutil;
  8. /**
  9. * EndpointInfo is used internally by CorbaLoc object to store the
  10. * host information used in creating the Service Object reference
  11. * from the -ORBInitDef and -ORBDefaultInitDef definitions.
  12. *
  13. * @Author Hemanth
  14. */
  15. public class IIOPEndpointInfo
  16. {
  17. // Version information
  18. private int major, minor;
  19. // Host Name and Port Number
  20. private String host;
  21. private int port;
  22. IIOPEndpointInfo( ) {
  23. // Default IIOP Version
  24. major = NamingConstants.DEFAULT_INS_GIOP_MAJOR_VERSION;
  25. minor = NamingConstants.DEFAULT_INS_GIOP_MINOR_VERSION;
  26. // Default host is localhost
  27. host = "localhost";
  28. // Default INS Port
  29. port = NamingConstants.DEFAULT_INS_PORT;
  30. }
  31. public void setHost( String theHost ) {
  32. host = theHost;
  33. }
  34. public String getHost( ) {
  35. return host;
  36. }
  37. public void setPort( int thePort ) {
  38. port = thePort;
  39. }
  40. public int getPort( ) {
  41. return port;
  42. }
  43. public void setVersion( int theMajor, int theMinor ) {
  44. major = theMajor;
  45. minor = theMinor;
  46. }
  47. public int getMajor( ) {
  48. return major;
  49. }
  50. public int getMinor( ) {
  51. return minor;
  52. }
  53. /** Internal Debug Method.
  54. */
  55. public void dump( ) {
  56. System.out.println( " Major -> " + major + " Minor -> " + minor );
  57. System.out.println( "host -> " + host );
  58. System.out.println( "port -> " + port );
  59. }
  60. }