28 * A PrimitiveOperation can be submitted, nothing more. Used only by |
28 * A PrimitiveOperation can be submitted, nothing more. Used only by |
29 * {@link OperationGroup#catchOperation} and as a supertype to {@link Operation}. |
29 * {@link OperationGroup#catchOperation} and as a supertype to {@link Operation}. |
30 * |
30 * |
31 * References in JavaDoc to the "collection of Operations" and "member |
31 * References in JavaDoc to the "collection of Operations" and "member |
32 * Operations" should be understood to include PrimitiveOperations. The |
32 * Operations" should be understood to include PrimitiveOperations. The |
33 * distinction between {@link Operation} and {@link PrimitiveOperation} in the |
33 * distinction between {@link Operation} and {@code PrimitiveOperation} in the |
34 * API is strictly followed as it enables the compiler to catch a significant |
34 * API is strictly followed as it enables the compiler to catch a significant |
35 * class of errors. The two types are not distinguished in the JavaDoc as making |
35 * class of errors. The two types are not distinguished in the JavaDoc as making |
36 * such a distinction would not add clarity. |
36 * such a distinction would not add clarity. |
37 * |
37 * |
38 * @see Operation |
38 * @see Operation |
39 * @see OperationGroup#catchOperation |
39 * @see OperationGroup#catchOperation |
40 */ |
40 */ |
41 public interface PrimitiveOperation<T> { |
41 public interface PrimitiveOperation<T> { |
42 |
42 |
43 /** |
43 /** |
44 * Add this {@link PrimitiveOperation} to the tail of the {@link Operation} |
44 * Add this {@code PrimitiveOperation} to the tail of the {@link Operation} |
45 * collection of the {@link Session} that created this |
45 * collection of the {@link Session} that created this |
46 * {@link PrimitiveOperation}. A {@link PrimitiveOperation} can be submitted |
46 * {@code PrimitiveOperation}. A {@code PrimitiveOperation} can be submitted |
47 * only once. Once a {@link PrimitiveOperation} is submitted it is immutable. |
47 * only once. Once a {@code PrimitiveOperation} is submitted it is immutable. |
48 * Any attempt to modify a submitted {@link PrimitiveOperation} will throw |
48 * Any attempt to modify a submitted {@code PrimitiveOperation} will throw |
49 * {@link IllegalStateException}. |
49 * {@link IllegalStateException}. |
50 * |
50 * |
51 * @return a {@link Submission} for this {@link PrimitiveOperation} |
51 * @return a {@link Submission} for this {@code PrimitiveOperation} |
52 * @throws IllegalStateException if this method is called more than once on |
52 * @throws IllegalStateException if this method is called more than once on |
53 * this {@link PrimitiveOperation} |
53 * this {@code PrimitiveOperation} |
54 */ |
54 */ |
55 Submission<T> submit(); |
55 Submission<T> submit(); |
56 |
56 |
57 } |
57 } |