1. /*
  2. * @(#)ResponseHandler.java 1.16 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package org.omg.CORBA.portable;
  8. /**
  9. This interface is supplied by an ORB to a servant at invocation time and allows
  10. the servant to later retrieve an OutputStream for returning the invocation results.
  11. */
  12. public interface ResponseHandler {
  13. /**
  14. * Called by the servant during a method invocation. The servant
  15. * should call this method to create a reply marshal buffer if no
  16. * exception occurred.
  17. *
  18. * @return an OutputStream suitable for marshalling the reply.
  19. *
  20. * @see <a href="package-summary.html#unimpl"><code>portable</code>
  21. * package comments for unimplemented features</a>
  22. */
  23. OutputStream createReply();
  24. /**
  25. * Called by the servant during a method invocation. The servant
  26. * should call this method to create a reply marshal buffer if a
  27. * user exception occurred.
  28. *
  29. * @return an OutputStream suitable for marshalling the exception
  30. * ID and the user exception body.
  31. */
  32. OutputStream createExceptionReply();
  33. }