1. /*
  2. * @(#)INSURLBase.java 1.5 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. /** The corbaloc: URL definitions from the -ORBInitDef and -ORBDefaultInitDef's
  9. * will be stored in this object. This object is capable of storing multiple
  10. * Host profiles as defined in the CorbaLoc grammer.
  11. *
  12. * @author Hemanth
  13. */
  14. public abstract class INSURLBase implements INSURL {
  15. // If rirFlag is set to true that means internal
  16. // boot strapping technique will be used. If set to
  17. // false then the EndpointInfo will be used to create the
  18. // Service Object reference.
  19. protected boolean rirFlag = false ;
  20. protected java.util.ArrayList theEndpointInfo = null ;
  21. protected String theKeyString = "NameService" ;
  22. protected String theStringifiedName = null ;
  23. public boolean getRIRFlag( ) {
  24. return rirFlag;
  25. }
  26. public java.util.List getEndpointInfo( ) {
  27. return theEndpointInfo;
  28. }
  29. public String getKeyString( ) {
  30. return theKeyString;
  31. }
  32. public String getStringifiedName( ) {
  33. return theStringifiedName;
  34. }
  35. public abstract boolean isCorbanameURL( );
  36. public void dPrint( ) {
  37. System.out.println( "URL Dump..." );
  38. System.out.println( "Key String = " + getKeyString( ) );
  39. System.out.println( "RIR Flag = " + getRIRFlag( ) );
  40. System.out.println( "isCorbanameURL = " + isCorbanameURL() );
  41. for( int i = 0; i < theEndpointInfo.size( ); i++ ) {
  42. ((IIOPEndpointInfo) theEndpointInfo.get( i )).dump( );
  43. }
  44. if( isCorbanameURL( ) ) {
  45. System.out.println( "Stringified Name = " + getStringifiedName() );
  46. }
  47. }
  48. }