1. /*
  2. * @(#)RemoteCall.java 1.17 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 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 the Java 2 platform since it is only used by deprecated methods of
  18. * <code>java.rmi.server.RemoteRef</code>.
  19. *
  20. * @version 1.17, 01/23/03
  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. * @return output stream for arguments/results
  33. * @exception java.io.IOException if an I/O error occurs.
  34. * @since JDK1.1
  35. * @deprecated no replacement
  36. */
  37. ObjectOutput getOutputStream() throws IOException;
  38. /**
  39. * Release the output stream; in some transports this would release
  40. * the stream.
  41. *
  42. * @exception java.io.IOException if an I/O error occurs.
  43. * @since JDK1.1
  44. * @deprecated no replacement
  45. */
  46. void releaseOutputStream() throws IOException;
  47. /**
  48. * Get the InputStream that the stub/skeleton should get
  49. * results/arguments from.
  50. *
  51. * @return input stream for reading arguments/results
  52. * @exception java.io.IOException if an I/O error occurs.
  53. * @since JDK1.1
  54. * @deprecated no replacement
  55. */
  56. ObjectInput getInputStream() throws IOException;
  57. /**
  58. * Release the input stream. This would allow some transports to release
  59. * the channel early.
  60. *
  61. * @exception java.io.IOException if an I/O error occurs.
  62. * @since JDK1.1
  63. * @deprecated no replacement
  64. */
  65. void releaseInputStream() throws IOException;
  66. /**
  67. * Returns an output stream (may put out header information
  68. * relating to the success of the call). Should only succeed
  69. * once per remote call.
  70. *
  71. * @param success If true, indicates normal return, else indicates
  72. * exceptional return.
  73. * @return output stream for writing call result
  74. * @exception java.io.IOException if an I/O error occurs.
  75. * @exception java.io.StreamCorruptedException If already been called.
  76. * @since JDK1.1
  77. * @deprecated no replacement
  78. */
  79. ObjectOutput getResultStream(boolean success) throws IOException,
  80. StreamCorruptedException;
  81. /**
  82. * Do whatever it takes to execute the call.
  83. *
  84. * @exception java.lang.Exception if a general exception occurs.
  85. * @since JDK1.1
  86. * @deprecated no replacement
  87. */
  88. void executeCall() throws Exception;
  89. /**
  90. * Allow cleanup after the remote call has completed.
  91. *
  92. * @exception java.io.IOException if an I/O error occurs.
  93. * @since JDK1.1
  94. * @deprecated no replacement
  95. */
  96. void done() throws IOException;
  97. }