1. /*
  2. * @(#)RemoteCall.java 1.11 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.rmi.server;
  8. import java.rmi.*;
  9. import java.io.ObjectOutput;
  10. import java.io.ObjectInput;
  11. import java.io.StreamCorruptedException;
  12. import java.io.IOException;
  13. /**
  14. * <code>RemoteCall</code> is an abstraction used solely by the RMI runtime
  15. * (in conjunction with stubs and skeletons of remote objects) to carry out a
  16. * call to a remote object. The <code>RemoteCall</code> interface is
  17. * deprecated in JDK1.2 since it is only used by deprecated methods of
  18. * <code>java.rmi.server.RemoteRef</code>.
  19. *
  20. * @version 1.11, 11/29/01
  21. * @since JDK1.1
  22. * @author Ann Wollrath
  23. * @author Roger Riggs
  24. * @see java.rmi.server.RemoteRef
  25. * @deprecated no replacement.
  26. */
  27. public interface RemoteCall {
  28. /**
  29. * Return the output stream the stub/skeleton should put arguments/results
  30. * into.
  31. *
  32. * @exception java.io.IOException if an I/O error occurs.
  33. * @since JDK1.1
  34. * @deprecated no replacement
  35. */
  36. ObjectOutput getOutputStream() throws IOException;
  37. /**
  38. * Release the output stream; in some transports this would release
  39. * the stream.
  40. *
  41. * @exception java.io.IOException if an I/O error occurs.
  42. * @since JDK1.1
  43. * @deprecated no replacement
  44. */
  45. void releaseOutputStream() throws IOException;
  46. /**
  47. * Get the InputStream that the stub/skeleton should get
  48. * results/arguments from.
  49. *
  50. * @exception java.io.IOException if an I/O error occurs.
  51. * @since JDK1.1
  52. * @deprecated no replacement
  53. */
  54. ObjectInput getInputStream() throws IOException;
  55. /**
  56. * Release the input stream. This would allow some transports to release
  57. * the channel early.
  58. *
  59. * @exception java.io.IOException if an I/O error occurs.
  60. * @since JDK1.1
  61. * @deprecated no replacement
  62. */
  63. void releaseInputStream() throws IOException;
  64. /**
  65. * Returns an output stream (may put out header information
  66. * relating to the success of the call). Should only succeed
  67. * once per remote call.
  68. *
  69. * @param success If true, indicates normal return, else indicates
  70. * exceptional return.
  71. * @exception java.io.IOException if an I/O error occurs.
  72. * @exception java.io.StreamCorruptedException If already been called.
  73. * @since JDK1.1
  74. * @deprecated no replacement
  75. */
  76. ObjectOutput getResultStream(boolean success) throws IOException,
  77. StreamCorruptedException;
  78. /**
  79. * Do whatever it takes to execute the call.
  80. *
  81. * @exception java.lang.Exception if a general exception occurs.
  82. * @since JDK1.1
  83. * @deprecated no replacement
  84. */
  85. void executeCall() throws Exception;
  86. /**
  87. * Allow cleanup after the remote call has completed.
  88. *
  89. * @exception java.io.IOException if an I/O error occurs.
  90. * @since JDK1.1
  91. * @deprecated no replacement
  92. */
  93. void done() throws IOException;
  94. }