01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: package org.netbeans.modules.bpel.debugger.spi.plugin.event;
21:
22: import java.util.Set;
23: import org.netbeans.modules.bpel.debugger.spi.plugin.request.EventRequest;
24:
25: /**
26: * A container for one or more
27: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.event.Event}
28: * objects.
29: * Several
30: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.event.Event}
31: * objects may be generated at a given time by the BPEL Engine.
32: * For example, there may be more than one
33: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.request.BreakpointReachedRequest}
34: * for a given
35: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.def.Position}
36: * or you might single step to the same
37: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.def.Position}
38: * as a
39: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.request.BreakpointReachedRequest}.
40: * These
41: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.event.Event}
42: * objects are delivered together as an EventSet.
43: * For uniformity, an EventSet is always used to deliver
44: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.event.Event}
45: * objects.
46: * EventSets are delivered by the
47: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.event.EventQueue}.
48: * EventSets are unmodifiable.
49: * <br><br>
50: * Associated with the issuance of an event set, process instance suspensions
51: * may have occurred in the target BPEL Engine. These suspensions correspond
52: * with the
53: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.request.EventRequest.SuspendPolicy}.
54: * <br>
55: * The events that are in an EventSet are restricted in the following ways:
56: * <ul>
57: * <li>Always singleton sets:
58: * <ul>
59: * <li>{@link org.netbeans.modules.bpel.debugger.spi.plugin.event.BpelEngineDisconnectedEvent}
60: * </ul>
61: * <li>Only with other ProcessInstanceCreatedEvents for the same process instance:
62: * <ul>
63: * <li>{@link org.netbeans.modules.bpel.debugger.spi.plugin.event.ProcessInstanceCreatedEvent}
64: * </ul>
65: * <li>Only with other ProcessInstanceCompletedEvents for the same process instance:
66: * <ul>
67: * <li>{@link org.netbeans.modules.bpel.debugger.spi.plugin.event.ProcessInstanceCompletedEvent}
68: * </ul>
69: * <li>Only with other members of this group, at the same position and in the same scope instance:
70: * <ul>
71: * <li>{@link org.netbeans.modules.bpel.debugger.spi.plugin.event.BreakpointReachedEvent}
72: * <li>{@link org.netbeans.modules.bpel.debugger.spi.plugin.event.StepCompletedEvent}
73: * </ul>
74: * </ul>
75: *
76: *
77: * @author Alexander Zgursky
78: */
79: public interface EventSet extends Set<Event> {
80: /**
81: * Returns the policy used to suspend process instances in the target
82: * BPEL Engine for this event set. This policy is selected from the suspend
83: * policies for each event's request; the target BPEL Engine chooses the
84: * policy which suspends the most process instances.
85: * The target BPEL Engine suspends process instances according to that
86: * policy and that policy is returned here, unless target BPEL Engine
87: * doesn't support required suspend policy.
88: * See
89: * {@link org.netbeans.modules.bpel.debugger.spi.plugin.request.EventRequest.SuspendPolicy}
90: * for the possible policy values.
91: *
92: * @return the suspend policy applied for this event set
93: */
94: EventRequest.SuspendPolicy getSuspendPolicy();
95: }
|