MessageMediator.java revision 608:7e06bf1dcb09
1166065Spjd/* 2166065Spjd * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. 3211354Spjd * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4166065Spjd * 5211235Spjd * This code is free software; you can redistribute it and/or modify it 6211235Spjd * under the terms of the GNU General Public License version 2 only, as 7211235Spjd * published by the Free Software Foundation. Oracle designates this 8211235Spjd * particular file as subject to the "Classpath" exception as provided 9248603Spjd * by Oracle in the LICENSE file that accompanied this code. 10211235Spjd * 11211235Spjd * This code is distributed in the hope that it will be useful, but WITHOUT 12211235Spjd * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13211235Spjd * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14211235Spjd * version 2 for more details (a copy is included in the LICENSE file that 15211235Spjd * accompanied this code). 16211235Spjd * 17211235Spjd * You should have received a copy of the GNU General Public License version 18211235Spjd * 2 along with this work; if not, write to the Free Software Foundation, 19211235Spjd * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20211235Spjd * 21275501Sngie * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22211235Spjd * or visit www.oracle.com if you need additional information or have any 23211235Spjd * questions. 24185218Spjd */ 25211235Spjd 26211235Spjdpackage com.sun.corba.se.pept.protocol; 27 28import com.sun.corba.se.pept.broker.Broker; 29import com.sun.corba.se.pept.encoding.InputObject; 30import com.sun.corba.se.pept.encoding.OutputObject; 31import com.sun.corba.se.pept.transport.Connection; 32import com.sun.corba.se.pept.transport.ContactInfo; 33 34import java.io.IOException; 35 36/** 37 * <code>MessageMediator</code> is a central repository for artifacts 38 * associated with an individual message. 39 * 40 * @author Harold Carr 41 */ 42public interface MessageMediator 43{ 44 /** 45 * The {@link com.sun.corba.se.pept.broker.Broker Broker} associated 46 * with an invocation. 47 * 48 * @return {@link com.sun.corba.se.pept.broker.Broker Broker} 49 */ 50 public Broker getBroker(); 51 52 /** 53 * Get the 54 * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo} 55 * which created this <code>MessageMediator</code>. 56 * 57 * @return 58 * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo} 59 */ 60 public ContactInfo getContactInfo(); 61 62 /** 63 * Get the 64 * {@link com.sun.corba.se.pept.transport.Connection Connection} 65 * on which this message is sent or received. 66 */ 67 public Connection getConnection(); 68 69 /** 70 * Used to initialize message headers. 71 * 72 * Note: this should be moved to a <code>RequestDispatcher</code>. 73 */ 74 public void initializeMessage(); 75 76 /** 77 * Used to send the message (or its last fragment). 78 * 79 * Note: this should be moved to a <code>RequestDispatcher</code>. 80 */ 81 public void finishSendingRequest(); 82 83 /** 84 * Used to wait for a response for synchronous messages. 85 * 86 * @deprecated 87 */ 88 @Deprecated 89 public InputObject waitForResponse(); 90 91 /** 92 * Used to set the 93 * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject} 94 * used for the message. 95 * 96 * @param outputObject 97 */ 98 public void setOutputObject(OutputObject outputObject); 99 100 /** 101 * Used to get the 102 * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject} 103 * used for the message. 104 * 105 * @return 106 * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject} 107 */ 108 public OutputObject getOutputObject(); 109 110 /** 111 * Used to set the 112 * {@link com.sun.corba.se.pept.encoding.InputObject InputObject} 113 * used for the message. 114 * 115 * @param inputObject 116 */ 117 public void setInputObject(InputObject inputObject); 118 119 /** 120 * Used to get the 121 * {@link com.sun.corba.se.pept.encoding.InputObject InputObject} 122 * used for the message. 123 * 124 * @return 125 * {@link com.sun.corba.se.pept.encoding.InputObject InputObject} 126 */ 127 public InputObject getInputObject(); 128} 129 130// End of file. 131