1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.resource.cci;
  6. import java.io.Serializable;
  7. /** An InteractionSpec holds properties for driving an Interaction
  8. * with an EIS instance. An InteractionSpec is used by an Interaction
  9. * to execute the specified function on an underlying EIS.
  10. *
  11. * <p>The CCI specification defines a set of standard properties for
  12. * an InteractionSpec. An InteractionSpec implementation is not
  13. * required to support a standard property if that property does
  14. * not apply to its underlying EIS.
  15. *
  16. * <p>The InteractionSpec implementation class must provide getter and
  17. * setter methods for each of its supported properties. The getter and
  18. * setter methods convention should be based on the Java Beans design
  19. * pattern.
  20. *
  21. * <p>The standard properties are as follows:
  22. * <UL>
  23. * <LI>FunctionName: name of an EIS function
  24. * <LI>InteractionVerb: mode of interaction with an EIS instance:
  25. * SYNC_SEND, SYNC_SEND_RECEIVE, SYNC_RECEIVE
  26. * <LI>ExecutionTimeout: the number of milliseconds an Interaction
  27. * will wait for an EIS to execute the specified function
  28. * </UL>
  29. *
  30. * <p>The following standard properties are used to give hints to an
  31. * Interaction instance about the ResultSet requirements:
  32. * <UL>
  33. * <LI>FetchSize
  34. * <LI>FetchDirection
  35. * <LI>MaxFieldSize
  36. * <LI>ResultSetType
  37. * <LI>ResultSetConcurrency
  38. * </UL>
  39. *
  40. * <p>A CCI implementation can provide additional properties beyond
  41. * that described in the InteractionSpec interface. Note that the
  42. * format and type of the additional properties is specific to an EIS
  43. * and is outside the scope of the CCI specification.
  44. *
  45. * <p>It is required that the InteractionSpec interface be implemented
  46. * as a JavaBean for the toolability support. The properties on the
  47. * InteractionSpec implementation class should be defined through the
  48. * getter and setter methods pattern. An implementation class for
  49. * InteractionSpec interface is required to implement the
  50. * java.io.Serializable interface.
  51. *
  52. * @author Rahul Sharma
  53. * @version 0.8
  54. * @since 0.8
  55. * @see javax.resource.cci.Interaction
  56. **/
  57. public interface InteractionSpec extends java.io.Serializable {
  58. /**Interaction Verb type: The execution of an Interaction does only a
  59. * send to the target EIS instance. The input record is sent to the
  60. * EIS instance without any synchronous response in terms of an
  61. * output Record or ResultSet.
  62. */
  63. public static final int SYNC_SEND = 0;
  64. /**Interaction Verb type: The execution of an Interaction sends a
  65. * request to the EIS instance and receives response synchronously.
  66. * The input record is sent to the EIS instance with the output
  67. * received either as Record or CCIResultSet.
  68. **/
  69. public static final int SYNC_SEND_RECEIVE = 1;
  70. /**The execution of an Interaction results in a synchronous
  71. * receive of an output Record. An example is: a session bean gets
  72. * a method invocation and it uses this SEND_RECEIVE form of
  73. * interaction to retrieve messages that have been delivered to a
  74. * message queue.
  75. **/
  76. public static final int SYNC_RECEIVE = 2;
  77. }