1. /*
  2. * @(#)RemoteCall.java 1.19 04/05/18
  3. *
  4. * Copyright 2004 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.19, 05/18/04
  21. * @since JDK1.1
  22. * @author Ann Wollrath
  23. * @author Roger Riggs
  24. * @see java.rmi.server.RemoteRef
  25. * @deprecated no replacement.
  26. */
  27. @Deprecated
  28. public interface RemoteCall {
  29. /**
  30. * Return the output stream the stub/skeleton should put arguments/results
  31. * into.
  32. *
  33. * @return output stream for arguments/results
  34. * @exception java.io.IOException if an I/O error occurs.
  35. * @since JDK1.1
  36. * @deprecated no replacement
  37. */
  38. @Deprecated
  39. ObjectOutput getOutputStream() throws IOException;
  40. /**
  41. * Release the output stream; in some transports this would release
  42. * the stream.
  43. *
  44. * @exception java.io.IOException if an I/O error occurs.
  45. * @since JDK1.1
  46. * @deprecated no replacement
  47. */
  48. @Deprecated
  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. @Deprecated
  60. ObjectInput getInputStream() throws IOException;
  61. /**
  62. * Release the input stream. This would allow some transports to release
  63. * the channel early.
  64. *
  65. * @exception java.io.IOException if an I/O error occurs.
  66. * @since JDK1.1
  67. * @deprecated no replacement
  68. */
  69. @Deprecated
  70. void releaseInputStream() throws IOException;
  71. /**
  72. * Returns an output stream (may put out header information
  73. * relating to the success of the call). Should only succeed
  74. * once per remote call.
  75. *
  76. * @param success If true, indicates normal return, else indicates
  77. * exceptional return.
  78. * @return output stream for writing call result
  79. * @exception java.io.IOException if an I/O error occurs.
  80. * @exception java.io.StreamCorruptedException If already been called.
  81. * @since JDK1.1
  82. * @deprecated no replacement
  83. */
  84. @Deprecated
  85. ObjectOutput getResultStream(boolean success) throws IOException,
  86. StreamCorruptedException;
  87. /**
  88. * Do whatever it takes to execute the call.
  89. *
  90. * @exception java.lang.Exception if a general exception occurs.
  91. * @since JDK1.1
  92. * @deprecated no replacement
  93. */
  94. @Deprecated
  95. void executeCall() throws Exception;
  96. /**
  97. * Allow cleanup after the remote call has completed.
  98. *
  99. * @exception java.io.IOException if an I/O error occurs.
  100. * @since JDK1.1
  101. * @deprecated no replacement
  102. */
  103. @Deprecated
  104. void done() throws IOException;
  105. }