comparison m-toolbox/classes/@LTPDARepositoryManager/cb_timerDisconnect.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % cb_timerDisconnect callback method which disconnects the connections
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % description: callback method which disconnects the connections
5 %
6 % version: $Id: cb_timerDisconnect.m,v 1.5 2010/06/25 08:55:52 hewitson Exp $
7 %
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9
10 function varargout = cb_timerDisconnect(varargin)
11
12 rm = LTPDARepositoryManager();
13 conns = rm.manager.getConnections();
14
15 if ~isempty(conns)
16
17 for ii=1:conns.size
18 conn = conns.get(ii-1);
19
20 % Clear the password only if the connection is not locked
21 if ~conn.isLocked
22 if (conn.ageConnected > rm.DISCONNECT)
23 conn.closeConnection();
24 if ~isempty(rm.gui)
25 rm.gui.reloadConnectionTable();
26 end
27 end
28 end
29 end
30
31 end
32
33 end
34
35