KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > wsif > providers > jca > WSIFProviderJCAExtensions


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
59 package org.apache.wsif.providers.jca;
60
61 import javax.wsdl.*;
62 import javax.resource.cci.*;
63 import org.apache.wsif.*;
64 import org.apache.wsif.providers.WSIFDynamicTypeMap;
65
66 /**
67  * This interface contains methods implemented by each Resource Adapter and used by the Connector
68  * Architecture provider to delegate Connector specific operations, for example creation of the
69  * WSIFOperation to the Resource Adapter.
70  *
71  * @author Michael Beisiegel
72  * @author Piotr Przybylski <piotrp@ca.ibm.com>
73  * @author John Green
74  */

75 public interface WSIFProviderJCAExtensions {
76     
77
78     /**
79      * The provider for a resource adapter creates a WSIFOperation based on the specified WSDL
80      * operation. The binding operation extensibility element allows the resource adapter to
81      * populate its InteractionSpec to be used in the operation.
82      *
83      * @param definition
84      * @param aService
85      * @param aPort
86      * @param operationName
87      * @param inputName
88      * @param outputName
89      * @param typeMap
90      * @param jcaPort
91      * @param connection
92      * @return WSIFOperation
93      * @throws WSIFException
94      */

95     public WSIFOperation createOperation(Definition definition, Service aService, Port aPort, String JavaDoc operationName, String JavaDoc inputName, String JavaDoc outputName, WSIFDynamicTypeMap typeMap, WSIFPort_JCA jcaPort, Connection connection) throws WSIFException;
96     /**
97      * This method creates input message. It only needs to be implemented by Resource Adapter which
98      * uses custom format of the input and output records (i.e. does not use javax.resource.cci.Streamable
99      * interface).
100      *
101      * @param definition
102      * @param binding
103      * @param operationName
104      * @param inputName
105      * @param outputName
106      * @return WSIFMessage
107      */

108     public WSIFMessage createInputMessage(Definition definition, Binding binding, String JavaDoc operationName, String JavaDoc inputName, String JavaDoc outputName);
109     /**
110      * This method creates output message. It only needs to be implemented by Resource Adapter which
111      * uses custom format of the input and output records (i.e. does not use javax.resource.cci.Streamable
112      * interface).
113      *
114      * @param definition
115      * @param binding
116      * @param operationName
117      * @param inputName
118      * @param outputName
119      * @return WSIFMessage
120      */

121     public WSIFMessage createOutputMessage(Definition definition, Binding binding, String JavaDoc operationName, String JavaDoc inputName, String JavaDoc outputName);
122     /**
123      * This method creates a FaultMessage.
124      *
125      * @param definition
126      * @param binding
127      * @param operationName
128      * @param inputName
129      * @param outputName
130      * @return WSIFMessage
131      */

132     public WSIFMessage createFaultMessage(Definition definition, Binding binding, String JavaDoc operationName, String JavaDoc inputName, String JavaDoc outputName);
133     /**
134      * Updates the interactionSpec from input message values. The method is called from
135      * within the operation execute method, before invocation of Interaction.execute() method
136      * of the resource adapter.
137      *
138      * @param input
139      * @param aBinding
140      * @param aOperationName
141      * @param aInputName
142      * @param aOutputName
143      * @param aInteractionSpec
144      * @throws WSIFException
145      */

146     public void updateInteractionSpec(WSIFMessage input, Binding aBinding, String JavaDoc aOperationName, String JavaDoc aInputName, String JavaDoc aOutputName, InteractionSpec aInteractionSpec) throws WSIFException;
147     /**
148      * Updates the output message using output InteractionSpec values. This method is called
149      * from within the WSIFOperation execute method, after processing the Interaction.execute() method
150      * of the resource adapter..
151      *
152      * @param output Output message to populate
153      * @param aBinding Bonding
154      * @param aOperationName Operation name
155      * @param aInputName Inpput name
156      * @param aOutputName Output name
157      * @param aInteractionSpec InteractionSpec after the execute() method invocation
158      * @throws WSIFException
159      */

160     public void updateOutputMessage(WSIFMessage output, Binding aBinding, String JavaDoc aOperationName, String JavaDoc aInputName, String JavaDoc aOutputName, InteractionSpec aInteractionSpec) throws WSIFException;
161     /**
162      * Creates a javax.resource.cci.Connection. This should be used when a resource adapter supports
163      * passing ConnectionSpec values as part of the input message. WSIFOperation_JCA will only call
164      * this method during the execute method if the WSIFPort_JCA does not contain a connection.
165      *
166      * @param input
167      * @param definition
168      * @param service
169      * @param port
170      * @param typeMap
171      * @param aBinding
172      * @param aOperationName
173      * @param aInputName
174      * @param aOutputName
175      * @return Connection
176      * @throws WSIFException
177      */

178     public Connection createConnection(WSIFMessage input, Definition definition, Service service, Port port, org.apache.wsif.providers.WSIFDynamicTypeMap typeMap, Binding aBinding, String JavaDoc aOperationName, String JavaDoc aInputName, String JavaDoc aOutputName) throws WSIFException;
179 }
180
Popular Tags