KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > activity > ActivityCoordinator


1 /**
2  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3  -
4  - JASS: Java Advanced tranSaction Support
5  -
6  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7  -
8  - This module was originally developed by
9  -
10  - LSD (Distributed Systems Lab, http://lsd.ls.fi.upm.es/lsd/lsd.htm)
11  - at Universidad Politecnica de Madrid (UPM) as an ObjectWeb Consortium
12  - (http://www.objectweb.org) project.
13  -
14  - This project has been partially funded by the European Commission under
15  - the IST programme of V FP grant IST-2001-37126 and by the Spanish
16  - Ministry of Science & Technology (MCyT) grants TIC2002-10376-E and
17  - TIC2001-1586-C03-02
18  -
19  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20  - The original code and portions created by LSD are
21  - Copyright (c) 2004 LSD (UPM)
22  - All rights reserved.
23  -
24  - Redistribution and use in source and binary forms, with or without
25  - modification, are permitted provided that the following conditions are met:
26  -
27  - -Redistributions of source code must retain the above copyright notice, this
28  - list of conditions and the following disclaimer.
29  -
30  - -Redistributions in binary form must reproduce the above copyright notice,
31  - this list of conditions and the following disclaimer in the documentation
32  - and/or other materials provided with the distribution.
33  -
34  - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
35  - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36  - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37  - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
38  - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39  - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40  - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
41  - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42  - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43  - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44  - POSSIBILITY OF SUCH DAMAGE.
45  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
46  -
47  - Author: Francisco Perez Sorrosal (frperezs)
48  -
49  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
50 */

51
52 package javax.activity;
53
54 import javax.activity.coordination.Action;
55
56 public interface ActivityCoordinator {
57
58     public void addAction(
59         Action action,
60         java.lang.String JavaDoc signalSetName,
61         int priority)
62         throws
63             SignalSetUnknownException JavaDoc,
64             SystemException JavaDoc,
65             java.lang.IllegalStateException JavaDoc;
66
67     public void addGlobalAction(Action action, int priority)
68         throws SystemException JavaDoc, java.lang.IllegalStateException JavaDoc;
69
70     public void removeAction(Action action, java.lang.String JavaDoc signalSetName)
71         throws
72             ActionNotFoundException JavaDoc, SystemException JavaDoc, java.lang.IllegalStateException JavaDoc;
73
74     public void removeGlobalAction(Action action)
75         throws
76             ActionNotFoundException JavaDoc, SystemException JavaDoc, java.lang.IllegalStateException JavaDoc;
77
78     public int getNumberRegisteredActions(java.lang.String JavaDoc signalSetName)
79         throws SignalSetUnknownException JavaDoc, SystemException JavaDoc;
80
81     public void setCompletionSignalSetName(java.lang.String JavaDoc signalSetName)
82         throws
83             SignalSetUnknownException JavaDoc,
84             SystemException JavaDoc,
85             java.lang.IllegalStateException JavaDoc;
86
87     public java.lang.String JavaDoc getCompletionSignalSetName() throws SystemException JavaDoc;
88
89     public ActivityCoordinator JavaDoc getParent() throws SystemException JavaDoc;
90
91     public GlobalId JavaDoc getGlobalId() throws SystemException JavaDoc;
92
93     public int getStatus() throws SystemException JavaDoc;
94
95     public int getParentStatus() throws SystemException JavaDoc;
96
97     public java.lang.String JavaDoc getName() throws SystemException JavaDoc;
98
99     public boolean isSameActivity(ActivityCoordinator JavaDoc coord)
100         throws SystemException JavaDoc;
101
102     public Action[] getActions(java.lang.String JavaDoc signalSetName)
103         throws SignalSetUnknownException JavaDoc, SystemException JavaDoc;
104
105     public Outcome JavaDoc completeActivity(int completionStatus)
106         throws
107             ActivityPendingException JavaDoc,
108             ContextPendingException JavaDoc,
109             NotOriginatorException JavaDoc,
110             InvalidStateException JavaDoc,
111             ActivityNotProcessedException JavaDoc,
112             SystemException JavaDoc;
113
114     public Outcome JavaDoc heuristicComplete(int completionStatus)
115         throws
116             ActivityPendingException JavaDoc,
117             ContextPendingException JavaDoc,
118             InvalidStateException JavaDoc,
119             ActivityNotProcessedException JavaDoc,
120             SystemException JavaDoc;
121
122     public Outcome JavaDoc processSignalSet(
123         java.lang.String JavaDoc signalSetName,
124         int completionStatus)
125         throws
126             SignalSetUnknownException JavaDoc,
127             ActivityNotProcessedException JavaDoc,
128             InvalidActivityException JavaDoc,
129             SystemException JavaDoc;
130 }
131
Popular Tags