KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > activity > UserActivity


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.ServiceManager;
55 import javax.activity.propertygroup.PropertyGroup;
56
57 public interface UserActivity {
58
59     public void begin(int timeout)
60                throws InvalidStateException JavaDoc,
61                       ServiceNotRegisteredException JavaDoc,
62                       TimeoutRangeException JavaDoc,
63                       SystemException JavaDoc;
64
65     public Outcome JavaDoc complete()
66                      throws NoActivityException JavaDoc,
67                             ActivityPendingException JavaDoc,
68                             ContextPendingException JavaDoc,
69                             ServiceNotRegisteredException JavaDoc,
70                             NotOriginatorException JavaDoc,
71                             ActivityNotProcessedException JavaDoc,
72                             SystemException JavaDoc;
73
74     public Outcome JavaDoc completeWithStatus(int completionStatus)
75                                throws NoActivityException JavaDoc,
76                                       ActivityPendingException JavaDoc,
77                                       ContextPendingException JavaDoc,
78                                       ServiceNotRegisteredException JavaDoc,
79                                       NotOriginatorException JavaDoc,
80                                       InvalidStateException JavaDoc,
81                                       ActivityNotProcessedException JavaDoc,
82                                       SystemException JavaDoc;
83
84     public void setCompletionStatus(int completionStatus)
85                              throws NoActivityException JavaDoc,
86                                     InvalidStateException JavaDoc,
87                                     ServiceNotRegisteredException JavaDoc,
88                                     SystemException JavaDoc;
89
90     public int getCompletionStatus()
91                             throws ServiceNotRegisteredException JavaDoc,
92                                    NoActivityException JavaDoc,
93                                    SystemException JavaDoc;
94
95     public int getStatus()
96                   throws ServiceNotRegisteredException JavaDoc,
97                          SystemException JavaDoc;
98
99     public java.lang.String JavaDoc getName()
100                              throws ServiceNotRegisteredException JavaDoc,
101                                     SystemException JavaDoc;
102
103     public void setTimeout(int timeout)
104                     throws ServiceNotRegisteredException JavaDoc,
105                            TimeoutRangeException JavaDoc,
106                            SystemException JavaDoc;
107
108     public int getTimeout()
109                    throws ServiceNotRegisteredException JavaDoc,
110                           SystemException JavaDoc;
111
112     public GlobalId JavaDoc getGlobalId()
113                          throws ServiceNotRegisteredException JavaDoc,
114                                 SystemException JavaDoc;
115
116     public Outcome JavaDoc broadcast(java.lang.String JavaDoc signalSetName)
117                       throws NoActivityException JavaDoc,
118                              SignalSetUnknownException JavaDoc,
119                              ServiceNotRegisteredException JavaDoc,
120                              InvalidActivityException JavaDoc,
121                              ActivityNotProcessedException JavaDoc,
122                              SystemException JavaDoc;
123
124     public ActivityCoordinator JavaDoc getCoordinator()
125                                        throws ServiceNotRegisteredException JavaDoc,
126                                               NoImplementException JavaDoc,
127                                               SystemException JavaDoc;
128
129     public ActivityCoordinator JavaDoc getParentCoordinator()
130                                              throws ServiceNotRegisteredException JavaDoc,
131                                                     NoImplementException JavaDoc,
132                                                     SystemException JavaDoc;
133
134     public PropertyGroup getPropertyGroup(java.lang.String JavaDoc name)
135                                    throws PropertyGroupUnknownException JavaDoc,
136                                           ServiceNotRegisteredException JavaDoc,
137                                           NoActivityException JavaDoc,
138                                           SystemException JavaDoc;
139
140     public void registerService(ServiceManager service)
141                          throws PropertyGroupUnknownException JavaDoc,
142                                 ServiceAlreadyRegisteredException JavaDoc,
143                                 SystemException JavaDoc;
144
145     public ServiceManager getService()
146                               throws SystemException JavaDoc;
147
148     public ActivityCoordinator JavaDoc recreate(GlobalId JavaDoc activity,
149                                         GlobalId JavaDoc parent,
150                                         boolean resume)
151                                  throws ServiceNotRegisteredException JavaDoc,
152                                         ActivityCompletedException JavaDoc,
153                                         java.lang.IllegalArgumentException JavaDoc,
154                                         SystemException JavaDoc;
155
156     public GlobalId JavaDoc[] recover()
157                        throws ServiceNotRegisteredException JavaDoc,
158                               SystemException JavaDoc;
159
160     public void forget(GlobalId JavaDoc globalId)
161                 throws ServiceNotRegisteredException JavaDoc,
162                        SystemException JavaDoc;
163     
164 }
165
Popular Tags