KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > pept > protocol > ClientRequestDispatcher


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
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.ContactInfo;
14
15 /**
16  * <code>ClientRequestDispatcher</code> coordinates the request (and possible
17  * response) processing for a specific <em>protocol</em>.
18  *
19  * @author Harold Carr
20  */

21 public interface ClientRequestDispatcher
22 {
23     /**
24      * At the beginning of a request the presentation block uses this
25      * to obtain an
26      * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
27      * to set data to be sent on a message.
28      *
29      * @param self -
30      * @param methodName - the remote method name
31      * @param isOneWay - <code>true</code> if the message is asynchronous
32      * @param contactInfo - the
33      * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo}
34      * which which created/chose this <code>ClientRequestDispatcher</code>
35      *
36      * @return
37      * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
38      */

39     public OutputObject beginRequest(Object JavaDoc self,
40                      String JavaDoc methodName,
41                      boolean isOneWay,
42                      ContactInfo contactInfo);
43
44     /**
45      * After the presentation block has set data on the
46      * {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}
47      * it signals the PEPt runtime to send the encoded data by calling this
48      * method.
49      *
50      * @param self -
51      * @param outputObject
52      *
53      * @return
54      * {@link com.sun.corba.se.pept.encoding.InputObject InputObject}
55      * if the message is synchronous.
56      *
57      * @throws
58      * {@link org.omg.CORBA.portable.ApplicationException ApplicationException}
59      * if the remote side raises an exception declared in the remote interface.
60      *
61      * @throws
62      * {@link org.omg.CORBA.portable.RemarshalException RemarshalException}
63      * if the PEPt runtime would like the presentation block to start over.
64      */

65     public InputObject marshalingComplete(java.lang.Object JavaDoc self,
66                       OutputObject outputObject)
67     // REVISIT EXCEPTIONS
68
throws
69         org.omg.CORBA.portable.ApplicationException JavaDoc,
70         org.omg.CORBA.portable.RemarshalException JavaDoc;
71
72     /**
73      * After the presentation block completes a request it signals
74      * the PEPt runtime by calling this method.
75      *
76      * This method may release resources. In some cases it may cause
77      * control or error messages to be sent.
78      *
79      * @param broker -
80      * @param inputObject -
81      */

82     public void endRequest(Broker broker,
83                java.lang.Object JavaDoc self,
84                InputObject inputObject);
85 }
86
87 // End of file.
88
Popular Tags