1. package com.sun.corba.se.PortableActivationIDL;
  2. /**
  3. * com/sun/corba/se/PortableActivationIDL/_RepositoryImplBase.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
  6. * Wednesday, September 15, 2004 3:50:44 AM PDT
  7. */
  8. public abstract class _RepositoryImplBase extends org.omg.CORBA.portable.ObjectImpl
  9. implements com.sun.corba.se.PortableActivationIDL.Repository, org.omg.CORBA.portable.InvokeHandler
  10. {
  11. // Constructors
  12. public _RepositoryImplBase ()
  13. {
  14. }
  15. private static java.util.Hashtable _methods = new java.util.Hashtable ();
  16. static
  17. {
  18. _methods.put ("registerServer", new java.lang.Integer (0));
  19. _methods.put ("unregisterServer", new java.lang.Integer (1));
  20. _methods.put ("getServer", new java.lang.Integer (2));
  21. _methods.put ("isInstalled", new java.lang.Integer (3));
  22. _methods.put ("install", new java.lang.Integer (4));
  23. _methods.put ("uninstall", new java.lang.Integer (5));
  24. _methods.put ("listRegisteredServers", new java.lang.Integer (6));
  25. _methods.put ("getApplicationNames", new java.lang.Integer (7));
  26. _methods.put ("getServerID", new java.lang.Integer (8));
  27. }
  28. public org.omg.CORBA.portable.OutputStream _invoke (String $method,
  29. org.omg.CORBA.portable.InputStream in,
  30. org.omg.CORBA.portable.ResponseHandler $rh)
  31. {
  32. org.omg.CORBA.portable.OutputStream out = null;
  33. java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
  34. if (__method == null)
  35. throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
  36. switch (__method.intValue ())
  37. {
  38. /** register server definition.
  39. * This returns the serverId of the server. A newly created server is
  40. * always uninstalled.
  41. */
  42. case 0: // PortableActivationIDL/Repository/registerServer
  43. {
  44. try {
  45. com.sun.corba.se.PortableActivationIDL.RepositoryPackage.ServerDef serverDef = com.sun.corba.se.PortableActivationIDL.RepositoryPackage.ServerDefHelper.read (in);
  46. String $result = null;
  47. $result = this.registerServer (serverDef);
  48. out = $rh.createReply();
  49. out.write_string ($result);
  50. } catch (com.sun.corba.se.PortableActivationIDL.ServerAlreadyRegistered $ex) {
  51. out = $rh.createExceptionReply ();
  52. com.sun.corba.se.PortableActivationIDL.ServerAlreadyRegisteredHelper.write (out, $ex);
  53. } catch (com.sun.corba.se.PortableActivationIDL.BadServerDefinition $ex) {
  54. out = $rh.createExceptionReply ();
  55. com.sun.corba.se.PortableActivationIDL.BadServerDefinitionHelper.write (out, $ex);
  56. }
  57. break;
  58. }
  59. /** unregister server definition
  60. */
  61. case 1: // PortableActivationIDL/Repository/unregisterServer
  62. {
  63. try {
  64. String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
  65. this.unregisterServer (serverId);
  66. out = $rh.createReply();
  67. } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
  68. out = $rh.createExceptionReply ();
  69. com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
  70. }
  71. break;
  72. }
  73. /** get server definition
  74. */
  75. case 2: // PortableActivationIDL/Repository/getServer
  76. {
  77. try {
  78. String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
  79. com.sun.corba.se.PortableActivationIDL.RepositoryPackage.ServerDef $result = null;
  80. $result = this.getServer (serverId);
  81. out = $rh.createReply();
  82. com.sun.corba.se.PortableActivationIDL.RepositoryPackage.ServerDefHelper.write (out, $result);
  83. } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
  84. out = $rh.createExceptionReply ();
  85. com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
  86. }
  87. break;
  88. }
  89. /** Return whether the server has been installed
  90. */
  91. case 3: // PortableActivationIDL/Repository/isInstalled
  92. {
  93. try {
  94. String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
  95. boolean $result = false;
  96. $result = this.isInstalled (serverId);
  97. out = $rh.createReply();
  98. out.write_boolean ($result);
  99. } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
  100. out = $rh.createExceptionReply ();
  101. com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
  102. }
  103. break;
  104. }
  105. /** Mark the server as being installed. Raises ServerAlreadyInstalled
  106. * if the server is currently marked as installed.
  107. */
  108. case 4: // PortableActivationIDL/Repository/install
  109. {
  110. try {
  111. String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
  112. this.install (serverId);
  113. out = $rh.createReply();
  114. } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
  115. out = $rh.createExceptionReply ();
  116. com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
  117. } catch (com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalled $ex) {
  118. out = $rh.createExceptionReply ();
  119. com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalledHelper.write (out, $ex);
  120. }
  121. break;
  122. }
  123. /** Mark the server as being uninstalled. Raises ServerAlreadyUninstalled
  124. * if the server is currently marked as uninstalled.
  125. */
  126. case 5: // PortableActivationIDL/Repository/uninstall
  127. {
  128. try {
  129. String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
  130. this.uninstall (serverId);
  131. out = $rh.createReply();
  132. } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
  133. out = $rh.createExceptionReply ();
  134. com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
  135. } catch (com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled $ex) {
  136. out = $rh.createExceptionReply ();
  137. com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalledHelper.write (out, $ex);
  138. }
  139. break;
  140. }
  141. /** list registered servers
  142. */
  143. case 6: // PortableActivationIDL/Repository/listRegisteredServers
  144. {
  145. String $result[] = null;
  146. $result = this.listRegisteredServers ();
  147. out = $rh.createReply();
  148. com.sun.corba.se.PortableActivationIDL.ServerIdsHelper.write (out, $result);
  149. break;
  150. }
  151. /** Returns list of ALL applicationNames defined in ServerDefs of registered
  152. * servers.
  153. */
  154. case 7: // PortableActivationIDL/Repository/getApplicationNames
  155. {
  156. String $result[] = null;
  157. $result = this.getApplicationNames ();
  158. out = $rh.createReply();
  159. com.sun.corba.se.PortableActivationIDL.RepositoryPackage.AppNamesHelper.write (out, $result);
  160. break;
  161. }
  162. /** Find the ServerID associated with the given application name.
  163. */
  164. case 8: // PortableActivationIDL/Repository/getServerID
  165. {
  166. try {
  167. String applicationName = in.read_string ();
  168. String $result = null;
  169. $result = this.getServerID (applicationName);
  170. out = $rh.createReply();
  171. out.write_string ($result);
  172. } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
  173. out = $rh.createExceptionReply ();
  174. com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
  175. }
  176. break;
  177. }
  178. default:
  179. throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
  180. }
  181. return out;
  182. } // _invoke
  183. // Type-specific CORBA::Object operations
  184. private static String[] __ids = {
  185. "IDL:PortableActivationIDL/Repository:1.0"};
  186. public String[] _ids ()
  187. {
  188. return (String[])__ids.clone ();
  189. }
  190. } // class _RepositoryImplBase