1. /*
  2. * @(#)MessageMediator.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 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.Connection;
  12. import com.sun.corba.se.pept.transport.ContactInfo;
  13. import java.io.IOException;
  14. /**
  15. * <code>MessageMediator</code> is a central repository for artifacts
  16. * associated with an individual message.
  17. *
  18. * @author Harold Carr
  19. */
  20. public interface MessageMediator
  21. {
  22. /**
  23. * The {@link com.sun.corba.se.pept.broker.Broker Broker} associated
  24. * with an invocation.
  25. *
  26. * @return {@link com.sun.corba.se.pept.broker.Broker Broker}
  27. */
  28. public Broker getBroker();
  29. /**
  30. * Get the
  31. * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo}
  32. * which created this <code>MessageMediator</code>.
  33. *
  34. * @return
  35. * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo}
  36. */
  37. public ContactInfo getContactInfo();
  38. /**
  39. * Get the
  40. * {@link com.sun.corba.se.pept.transport.Connection Connection}
  41. * on which this message is sent or received.
  42. */
  43. public Connection getConnection();
  44. /**
  45. * Used to initialize message headers.
  46. *
  47. * Note: this should be moved to a <code>RequestDispatcher</code>.
  48. */
  49. public void initializeMessage();
  50. /**
  51. * Used to send the message (or its last fragment).
  52. *
  53. * Note: this should be moved to a <code>RequestDispatcher</code>.
  54. */
  55. public void finishSendingRequest();
  56. /**
  57. * Used to wait for a response for synchronous messages.
  58. *
  59. * @deprecated
  60. */
  61. @Deprecated
  62. public InputObject waitForResponse();
  63. /**
  64. * Used to set the
  65. * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
  66. * used for the message.
  67. *
  68. * @param outputObject
  69. */
  70. public void setOutputObject(OutputObject outputObject);
  71. /**
  72. * Used to get the
  73. * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
  74. * used for the message.
  75. *
  76. * @return
  77. * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
  78. */
  79. public OutputObject getOutputObject();
  80. /**
  81. * Used to set the
  82. * {@link com.sun.corba.se.pept.encoding.InputObject InputObject}
  83. * used for the message.
  84. *
  85. * @param inputObject
  86. */
  87. public void setInputObject(InputObject inputObject);
  88. /**
  89. * Used to get the
  90. * {@link com.sun.corba.se.pept.encoding.InputObject InputObject}
  91. * used for the message.
  92. *
  93. * @return
  94. * {@link com.sun.corba.se.pept.encoding.InputObject InputObject}
  95. */
  96. public InputObject getInputObject();
  97. }
  98. // End of file.