1. /*
  2. * @(#)ClientRequestDispatcher.java 1.14 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 com.sun.corba.se.pept.protocol;
  8. import com.sun.corba.se.pept.broker.Broker;
  9. import com.sun.corba.se.pept.encoding.InputObject;
  10. import com.sun.corba.se.pept.encoding.OutputObject;
  11. import com.sun.corba.se.pept.transport.ContactInfo;
  12. /**
  13. * <code>ClientRequestDispatcher</code> coordinates the request (and possible
  14. * response) processing for a specific <em>protocol</em>.
  15. *
  16. * @author Harold Carr
  17. */
  18. public interface ClientRequestDispatcher
  19. {
  20. /**
  21. * At the beginning of a request the presentation block uses this
  22. * to obtain an
  23. * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
  24. * to set data to be sent on a message.
  25. *
  26. * @param self -
  27. * @param methodName - the remote method name
  28. * @param isOneWay - <code>true</code> if the message is asynchronous
  29. * @param contactInfo - the
  30. * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo}
  31. * which which created/chose this <code>ClientRequestDispatcher</code>
  32. *
  33. * @return
  34. * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
  35. */
  36. public OutputObject beginRequest(Object self,
  37. String methodName,
  38. boolean isOneWay,
  39. ContactInfo contactInfo);
  40. /**
  41. * After the presentation block has set data on the
  42. * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
  43. * it signals the PEPt runtime to send the encoded data by calling this
  44. * method.
  45. *
  46. * @param self -
  47. * @param outputObject
  48. *
  49. * @return
  50. * {@link com.sun.corba.se.pept.encoding.InputObject InputObject}
  51. * if the message is synchronous.
  52. *
  53. * @throws
  54. * {@link org.omg.CORBA.portable.ApplicationException ApplicationException}
  55. * if the remote side raises an exception declared in the remote interface.
  56. *
  57. * @throws
  58. * {@link org.omg.CORBA.portable.RemarshalException RemarshalException}
  59. * if the PEPt runtime would like the presentation block to start over.
  60. */
  61. public InputObject marshalingComplete(java.lang.Object self,
  62. OutputObject outputObject)
  63. // REVISIT EXCEPTIONS
  64. throws
  65. org.omg.CORBA.portable.ApplicationException,
  66. org.omg.CORBA.portable.RemarshalException;
  67. /**
  68. * After the presentation block completes a request it signals
  69. * the PEPt runtime by calling this method.
  70. *
  71. * This method may release resources. In some cases it may cause
  72. * control or error messages to be sent.
  73. *
  74. * @param broker -
  75. * @param inputObject -
  76. */
  77. public void endRequest(Broker broker,
  78. java.lang.Object self,
  79. InputObject inputObject);
  80. }
  81. // End of file.