KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jass > hls > ont > ONTActivityImpl


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 package org.objectweb.jass.hls.ont;
52
53 import java.io.Serializable JavaDoc;
54
55 import javax.activity.ActivityToken JavaDoc;
56 import javax.activity.opennested.ONTActivity;
57 import javax.transaction.Transaction JavaDoc;
58
59 /**
60  * Implements the ONTActivity interface in order to implement suspend and
61  * resume methods of the extension of UserOpenNested interface.
62  * @author fran
63  * Date: Feb 25, 2004
64  * org.objectweb.jass.hls.ontONTActivityImpl.java
65  */

66 public class ONTActivityImpl implements ONTActivity, Serializable JavaDoc {
67     
68     Transaction JavaDoc tx;
69     ActivityToken JavaDoc at;
70     
71     /**
72      * ONTActivityImpl constructor.
73      * @param tx the associated transaction.
74      * @param at the associated ActivityToken element.
75      */

76     public ONTActivityImpl (Transaction JavaDoc tx, ActivityToken JavaDoc at) {
77         this.tx = tx;
78         this.at = at;
79     }
80
81     /**
82      * Returns the transaction associated to the ONTActivity
83      */

84     public Transaction JavaDoc getTransaction() {
85         return tx;
86     }
87
88     /**
89      * Sets the transaction associated to the ONTActivity
90      */

91     public void setTransaction(Transaction JavaDoc tx) {
92         this.tx = tx;
93     }
94
95     /**
96      * Returns the ActivityTokenof the ONT activity
97      */

98     public ActivityToken JavaDoc getActivityToken() {
99         return at;
100     }
101
102     /**
103      * Set the ActivityToken of the ONT activity
104      */

105     public void setActivityToken(ActivityToken JavaDoc at) {
106         this.at = at;
107     }
108
109 }
110
Popular Tags