001: /*
002: * Copyright 2001-2003 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package com.sun.corba.se.pept.protocol;
027:
028: import com.sun.corba.se.pept.broker.Broker;
029: import com.sun.corba.se.pept.encoding.InputObject;
030: import com.sun.corba.se.pept.encoding.OutputObject;
031: import com.sun.corba.se.pept.transport.ContactInfo;
032:
033: /**
034: * <code>ClientRequestDispatcher</code> coordinates the request (and possible
035: * response) processing for a specific <em>protocol</em>.
036: *
037: * @author Harold Carr
038: */
039: public interface ClientRequestDispatcher {
040: /**
041: * At the beginning of a request the presentation block uses this
042: * to obtain an
043: * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
044: * to set data to be sent on a message.
045: *
046: * @param self -
047: * @param methodName - the remote method name
048: * @param isOneWay - <code>true</code> if the message is asynchronous
049: * @param contactInfo - the
050: * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo}
051: * which which created/chose this <code>ClientRequestDispatcher</code>
052: *
053: * @return
054: * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
055: */
056: public OutputObject beginRequest(Object self, String methodName,
057: boolean isOneWay, ContactInfo contactInfo);
058:
059: /**
060: * After the presentation block has set data on the
061: * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
062: * it signals the PEPt runtime to send the encoded data by calling this
063: * method.
064: *
065: * @param self -
066: * @param outputObject
067: *
068: * @return
069: * {@link com.sun.corba.se.pept.encoding.InputObject InputObject}
070: * if the message is synchronous.
071: *
072: * @throws
073: * {@link org.omg.CORBA.portable.ApplicationException ApplicationException}
074: * if the remote side raises an exception declared in the remote interface.
075: *
076: * @throws
077: * {@link org.omg.CORBA.portable.RemarshalException RemarshalException}
078: * if the PEPt runtime would like the presentation block to start over.
079: */
080: public InputObject marshalingComplete(java.lang.Object self,
081: OutputObject outputObject)
082: // REVISIT EXCEPTIONS
083: throws org.omg.CORBA.portable.ApplicationException,
084: org.omg.CORBA.portable.RemarshalException;
085:
086: /**
087: * After the presentation block completes a request it signals
088: * the PEPt runtime by calling this method.
089: *
090: * This method may release resources. In some cases it may cause
091: * control or error messages to be sent.
092: *
093: * @param broker -
094: * @param inputObject -
095: */
096: public void endRequest(Broker broker, java.lang.Object self,
097: InputObject inputObject);
098: }
099:
100: // End of file.
|