Session.java
Go to the documentation of this file.
00001 /*
00002  * (c) copyright 2008, Technische Universitaet Graz and Technische Universitaet Wien
00003  *
00004  * This file is part of jdiagengine.
00005  *
00006  * jdiagengine is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * jdiagengine is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * You should have received a copy of the GNU General Public License
00016  * along with jdiagengine. If not, see <http://www.gnu.org/licenses/>.
00017  *
00018  * Authors: Joerg Weber, Franz Wotawa
00019  * Contact: jweber@ist.tugraz.at (preferred), or fwotawa@ist.tugraz.at
00020  *
00021  */
00022 
00023 
00024 
00025 package ATPInterface;
00026 
00027 import java.util.*;
00028 
00044 public class Session {
00045 
00046     // The name of the session.
00047     protected String name;
00048 
00049     // The connections this session is associated to.
00050     protected Vector connections;
00051 
00052     // The logical DB.
00053     protected LogicalDBInterface db;
00054 
00058     public Session(String name) {
00059         this.name = name;
00060         connections = new Vector();
00061         db = new LogicalDB();
00062     }
00063     
00067     public String getName() {
00068         return name;
00069     }
00070 
00076     public Vector getConnections() {
00077         assert(Thread.holdsLock(this));
00078         return connections;
00079     }
00080 
00085     public LogicalDBInterface getDB() {
00086         assert(Thread.holdsLock(this));
00087         return db;
00088     }
00089 
00094     public void close() {
00095         assert(Thread.holdsLock(this));
00096         assert(connections.size() == 0);
00097     }
00098 
00099 }


tug_ist_diagnosis_engine
Author(s): Safdar Zaman, Gerald Steinbauer
autogenerated on Mon Jan 6 2014 11:51:16