1. /*
  2. * @(#)MinorCodes.java 1.25 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.internal.CosNaming;
  8. import com.sun.corba.se.internal.orbutil.ORBConstants ;
  9. /**
  10. * The Minor Codes for the transient and persistent name server.
  11. */
  12. public final class MinorCodes {
  13. /**
  14. * The base number for all NamingContextImpl exception minor codes.
  15. */
  16. private static final int NAMING_CTX_BASE = ORBConstants.COSNAMING_BASE ;
  17. /**
  18. * The base number for all TransientNameService exception minor codes.
  19. */
  20. private static final int TRANS_NS_BASE = ORBConstants.COSNAMING_BASE + 50;
  21. /**
  22. * The base number for all TransientNamingContext exception minor codes.
  23. */
  24. private static final int TRANS_NC_BASE = ORBConstants.COSNAMING_BASE + 100;
  25. /**
  26. * The constructor is private since there should be no instances.
  27. */
  28. private MinorCodes() {}
  29. // CORBA::INITIALIZE
  30. /**
  31. * The transient name service caught a CORBA::SystemException while
  32. * initializing.
  33. */
  34. public static final int TRANS_NS_CANNOT_CREATE_INITIAL_NC_SYS = TRANS_NS_BASE+0;
  35. /**
  36. * The transient name service caught a Java exception while initializing.
  37. */
  38. public static final int TRANS_NS_CANNOT_CREATE_INITIAL_NC = TRANS_NS_BASE+1;
  39. // CORBA::INTERNAL
  40. /**
  41. * An AlreadyBound exception was thrown in a rebind operation, which
  42. * is unexpected.
  43. */
  44. public static final int NAMING_CTX_REBIND_ALREADY_BOUND = NAMING_CTX_BASE+0;
  45. /**
  46. * An AlreadyBound exception was thrown in a rebind_context operation, which
  47. * is unexpected.
  48. */
  49. public static final int NAMING_CTX_REBINDCTX_ALREADY_BOUND = NAMING_CTX_BASE+1;
  50. /**
  51. * The binding type passed to the internal binding implementation was
  52. * not BindingType::nobject or BindingType::ncontext.
  53. */
  54. public static final int NAMING_CTX_BAD_BINDINGTYPE = NAMING_CTX_BASE+2;
  55. /**
  56. * A object reference was bound as a context, but it could not be narrowed
  57. * to CosNaming::NamingContext.
  58. */
  59. public static final int NAMING_CTX_RESOLVE_CANNOT_NARROW_TO_CTX = NAMING_CTX_BASE+3;
  60. /**
  61. * The implementation of the bind operation encountered a previous
  62. * binding, which is unexpected.
  63. */
  64. public static final int TRANS_NC_BIND_ALREADY_BOUND = TRANS_NC_BASE+0;
  65. /**
  66. * The implementation of the list operation caught a Java exception
  67. * while creating the list iterator, which is unexpected.
  68. */
  69. public static final int TRANS_NC_LIST_GOT_EXC = TRANS_NC_BASE+1;
  70. /**
  71. * The implementation of the new_context operation caught a Java exception
  72. * while creating the new NamingContext servant, which is unexpected.
  73. */
  74. public static final int TRANS_NC_NEWCTX_GOT_EXC = TRANS_NC_BASE+2;
  75. /**
  76. * The implementation of the destroy operation caught a Java exception
  77. * while disconnecting from the ORB.
  78. */
  79. public static final int TRANS_NC_DESTROY_GOT_EXC = TRANS_NC_BASE+3;
  80. /**
  81. * The Object Reference passed as the argument in rebind( ) and bind( )
  82. * is invalid
  83. */
  84. public static final int OBJECT_IS_NULL = TRANS_NC_BASE+4;
  85. // For -ORBInitDef a stringified reference other than
  86. // corbaloc: corbaname: IOR: is given
  87. public static final int INS_BAD_SCHEME_NAME = TRANS_NC_BASE + 5;
  88. // For one of the -ORBInitDef The HostAddress given is not correct
  89. public static final int INS_BAD_ADDRESS = TRANS_NC_BASE + 6;
  90. // -ORBInitDef's stringified URL is malformed
  91. public static final int INS_BAD_SCHEME_SPECIFIC_PART = TRANS_NC_BASE + 7;
  92. // -ORBInitDef's stringified URL is malformed
  93. public static final int INS_OTHER = TRANS_NC_BASE + 8;
  94. }