Save This Page
Home » glassfish-v2ur2-b04-src » javax.resource.cci » [javadoc | source]
    1   /*
    2    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    3    * 
    4    * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    5    * 
    6    * The contents of this file are subject to the terms of either the GNU
    7    * General Public License Version 2 only ("GPL") or the Common Development
    8    * and Distribution License("CDDL") (collectively, the "License").  You
    9    * may not use this file except in compliance with the License. You can obtain
   10    * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
   11    * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
   12    * language governing permissions and limitations under the License.
   13    * 
   14    * When distributing the software, include this License Header Notice in each
   15    * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
   16    * Sun designates this particular file as subject to the "Classpath" exception
   17    * as provided by Sun in the GPL Version 2 section of the License file that
   18    * accompanied this code.  If applicable, add the following below the License
   19    * Header, with the fields enclosed by brackets [] replaced by your own
   20    * identifying information: "Portions Copyrighted [year]
   21    * [name of copyright owner]"
   22    * 
   23    * Contributor(s):
   24    * 
   25    * If you wish your version of this file to be governed by only the CDDL or
   26    * only the GPL Version 2, indicate your decision by adding "[Contributor]
   27    * elects to include this software in this distribution under the [CDDL or GPL
   28    * Version 2] license."  If you don't indicate a single choice of license, a
   29    * recipient has the option to distribute your version of this file under
   30    * either the CDDL, the GPL Version 2 or to extend the choice of license to
   31    * its licensees as provided above.  However, if you add GPL Version 2 code
   32    * and therefore, elected the GPL Version 2 license, then the option applies
   33    * only if the new code is made subject to such option by the copyright
   34    * holder.
   35    */
   36   
   37   package javax.resource.cci;
   38   
   39   import java.io.Serializable;
   40   
   41   /** An InteractionSpec holds properties for driving an Interaction 
   42    *  with an EIS instance. An InteractionSpec is used by an Interaction
   43    *  to execute the specified function on an underlying EIS.
   44    *
   45    *  <p>The CCI specification defines a set of standard properties for
   46    *  an InteractionSpec. An InteractionSpec implementation is not 
   47    *  required to support a standard property if that property does 
   48    *  not apply to its underlying EIS.
   49    *
   50    *  <p>The InteractionSpec implementation class must provide getter and
   51    *  setter methods for each of its supported properties. The getter and 
   52    *  setter methods convention should be based on the Java Beans design
   53    *  pattern.
   54    * 
   55    *  <p>The standard properties are as follows:
   56    *  <UL>
   57    *     <LI>FunctionName: name of an EIS function
   58    *     <LI>InteractionVerb: mode of interaction with an EIS instance:
   59    *         SYNC_SEND, SYNC_SEND_RECEIVE, SYNC_RECEIVE
   60    *     <LI>ExecutionTimeout: the number of milliseconds an Interaction 
   61    *         will wait for an EIS to execute the specified function
   62    *  </UL>
   63    *  
   64    *  <p>The following standard properties are used to give hints to an 
   65    *  Interaction instance about the ResultSet requirements:
   66    *  <UL>
   67    *     <LI>FetchSize
   68    *     <LI>FetchDirection
   69    *     <LI>MaxFieldSize
   70    *     <LI>ResultSetType
   71    *     <LI>ResultSetConcurrency
   72    *  </UL>
   73    *
   74    *  <p>A CCI implementation can provide additional properties beyond
   75    *  that described in the InteractionSpec interface. Note that the 
   76    *  format and type of the additional properties is specific to an EIS 
   77    *  and is outside the scope of the CCI specification.
   78    *  
   79    *  <p>It is required that the InteractionSpec interface be implemented
   80    *  as a JavaBean for the toolability support. The properties on the 
   81    *  InteractionSpec implementation class should be defined through the 
   82    *  getter and setter methods pattern. An implementation class for 
   83    *  InteractionSpec interface is  required to implement the 
   84    *  java.io.Serializable interface.
   85    *
   86    *  @author  Rahul Sharma
   87    *  @version 0.8
   88    *  @since   0.8
   89    *  @see     javax.resource.cci.Interaction
   90   **/
   91   
   92   public interface InteractionSpec extends java.io.Serializable {
   93     
   94     /**Interaction Verb type: The execution of an Interaction does only a 
   95      * send to the target EIS instance. The input record is sent to the
   96      * EIS instance without any synchronous response in terms of an 
   97      * output Record or ResultSet.
   98      */
   99     public static final int SYNC_SEND = 0;
  100   
  101     /**Interaction Verb type: The execution of an Interaction sends a 
  102      * request to the EIS instance and receives response synchronously. 
  103      * The input record is sent to the EIS instance with the output 
  104      * received either as Record or CCIResultSet.
  105      **/
  106     public static final int SYNC_SEND_RECEIVE = 1;
  107   
  108     /**The execution of an Interaction results in a synchronous 
  109      * receive of an output Record. An example is: a session bean gets
  110      * a method invocation and it uses this SEND_RECEIVE form of 
  111      * interaction to retrieve messages that have been delivered to a 
  112      * message queue. 
  113      **/
  114     public static final int SYNC_RECEIVE = 2;
  115   
  116   }

Save This Page
Home » glassfish-v2ur2-b04-src » javax.resource.cci » [javadoc | source]