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