KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > wsif > WSIFPort


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  *
5  * Copyright (c) 2002 The Apache Software Foundation. All rights
6  * reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Apache Software Foundation (http://www.apache.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "WSIF" and "Apache Software Foundation" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact apache@apache.org.
31  *
32  * 5. Products derived from this software may not be called "Apache",
33  * nor may "Apache" appear in their name, without prior written
34  * permission of the Apache Software Foundation.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This software consists of voluntary contributions made by many
51  * individuals on behalf of the Apache Software Foundation and was
52  * originally based on software copyright (c) 2001, 2002, International
53  * Business Machines, Inc., http://www.apache.org. For more
54  * information on the Apache Software Foundation, please see
55  * <http://www.apache.org/>.
56  */

57
58 package org.apache.wsif;
59
60 import java.io.Serializable JavaDoc;
61
62 /**
63  * A WSIFPort represents the handle by which the operations
64  * from the <portType> of the <port> of this WSIFPort can be
65  * executed. This is an interface which must implemented by
66  * specific implementations for the ports. That is, the actual
67  * logic is dependent on the binding associated with this port.
68  * An interface is used to enable dynamic implementation generation
69  * using JDK1.3 dynamic proxy stuff.
70  *
71  * @author Paul Fremantle
72  * @author Alekander Slominski
73  * @author Matthew J. Duftler
74  * @author Sanjiva Weerawarana
75  * @author Nirmal Mukhi
76  */

77 public interface WSIFPort extends Serializable JavaDoc {
78     /**
79      * Create a new WSIFOperation. There must be exactly one
80      * operation in this port's portType with this name. For
81      * overloaded operations see {@link #createOperation(String,String,String)}.
82      *
83      * @param operationName the name of an operation in this port's portType
84      * @return the new WSIFOperation
85      * @exception WSIFException if something goes wrong
86      */

87     public WSIFOperation createOperation(String JavaDoc operationName)
88         throws WSIFException;
89
90     /**
91      * Create a new WSIFOperation. There must be an
92      * operation in this port's portType with this operation name,
93      * input message name and output message name. The input message name
94      * distinguishes overloaded operations.
95      *
96      * @param operationName the name of an operation in this port's portType
97      * @param inputName the input message name
98      * @param outputName the output message name
99      * @return the new WSIFOperation
100      * @exception WSIFException if something goes wrong
101      */

102     public WSIFOperation createOperation(
103         String JavaDoc operationName,
104         String JavaDoc inputName,
105         String JavaDoc outputName)
106         throws WSIFException;
107
108     /**
109      * Close this port; indicates that the user is done using it. This
110      * is only essential for WSIFPorts that are being used in a stateful
111      * or resource-shared manner. Responsible stubs will call this if
112      * feasible at the right time.
113      * @exception WSIFException if something goes wrong
114      */

115     public void close() throws WSIFException;
116
117     /**
118      * Tests if this port supports synchronous calls to operations.
119      * @return <code>true</code> this port support synchronous calls
120      * <br><code>false</code> this port does not support synchronous calls
121      */

122     public boolean supportsSync();
123
124     /**
125      * Tests if this port supports asynchronous calls to operations.
126      * @return <code>true</code> this port support asynchronous calls
127      * <br><code>false</code> this port does not support asynchronous calls
128      */

129     public boolean supportsAsync();
130
131     /**
132      * Gets the context information for this WSIFPort.
133      * @return context
134      */

135     public WSIFMessage getContext() throws WSIFException ;
136
137     /**
138      * Sets the context information for this WSIFPort.
139      * @param WSIFMessage the new context information
140      */

141     public void setContext(WSIFMessage context);
142
143 }
144
Popular Tags