KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > resource > cci > InteractionSpec


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package javax.resource.cci;
25
26 import java.io.Serializable JavaDoc;
27
28 /** An InteractionSpec holds properties for driving an Interaction
29  * with an EIS instance. An InteractionSpec is used by an Interaction
30  * to execute the specified function on an underlying EIS.
31  *
32  * <p>The CCI specification defines a set of standard properties for
33  * an InteractionSpec. An InteractionSpec implementation is not
34  * required to support a standard property if that property does
35  * not apply to its underlying EIS.
36  *
37  * <p>The InteractionSpec implementation class must provide getter and
38  * setter methods for each of its supported properties. The getter and
39  * setter methods convention should be based on the Java Beans design
40  * pattern.
41  *
42  * <p>The standard properties are as follows:
43  * <UL>
44  * <LI>FunctionName: name of an EIS function
45  * <LI>InteractionVerb: mode of interaction with an EIS instance:
46  * SYNC_SEND, SYNC_SEND_RECEIVE, SYNC_RECEIVE
47  * <LI>ExecutionTimeout: the number of milliseconds an Interaction
48  * will wait for an EIS to execute the specified function
49  * </UL>
50  *
51  * <p>The following standard properties are used to give hints to an
52  * Interaction instance about the ResultSet requirements:
53  * <UL>
54  * <LI>FetchSize
55  * <LI>FetchDirection
56  * <LI>MaxFieldSize
57  * <LI>ResultSetType
58  * <LI>ResultSetConcurrency
59  * </UL>
60  *
61  * <p>A CCI implementation can provide additional properties beyond
62  * that described in the InteractionSpec interface. Note that the
63  * format and type of the additional properties is specific to an EIS
64  * and is outside the scope of the CCI specification.
65  *
66  * <p>It is required that the InteractionSpec interface be implemented
67  * as a JavaBean for the toolability support. The properties on the
68  * InteractionSpec implementation class should be defined through the
69  * getter and setter methods pattern. An implementation class for
70  * InteractionSpec interface is required to implement the
71  * java.io.Serializable interface.
72  *
73  * @author Rahul Sharma
74  * @version 0.8
75  * @since 0.8
76  * @see javax.resource.cci.Interaction
77 **/

78
79 public interface InteractionSpec extends java.io.Serializable JavaDoc {
80   
81   /**Interaction Verb type: The execution of an Interaction does only a
82    * send to the target EIS instance. The input record is sent to the
83    * EIS instance without any synchronous response in terms of an
84    * output Record or ResultSet.
85    */

86   public static final int SYNC_SEND = 0;
87
88   /**Interaction Verb type: The execution of an Interaction sends a
89    * request to the EIS instance and receives response synchronously.
90    * The input record is sent to the EIS instance with the output
91    * received either as Record or CCIResultSet.
92    **/

93   public static final int SYNC_SEND_RECEIVE = 1;
94
95   /**The execution of an Interaction results in a synchronous
96    * receive of an output Record. An example is: a session bean gets
97    * a method invocation and it uses this SEND_RECEIVE form of
98    * interaction to retrieve messages that have been delivered to a
99    * message queue.
100    **/

101   public static final int SYNC_RECEIVE = 2;
102
103 }
104
Popular Tags