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