org.aselect.agent.admin
Class SessionMonitorModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.aselect.agent.admin.SessionMonitorModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, javax.swing.table.TableModel

public class SessionMonitorModel
extends javax.swing.table.AbstractTableModel
implements java.lang.Runnable

Monitors the pending authentication sessions of the A-Select Agent.

Description:
This method monitors the pending authentication sessions of the A-Select Agent. This class implements Runnable in which it periodically checks the SessionManager for pending sessions. The data is used by the AdminMonitor for display in the GUI.

Concurrency issues:
None.

Author:
Alfa & Ariss
See Also:
Serialized Form

Field Summary
static java.lang.String MODULE
          The MODULE name.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
SessionMonitorModel(int iCheckInterval)
          Initializes the class.
 
Method Summary
 int getColumnCount()
          Returns the number of columns.
 java.lang.String getColumnName(int iIndex)
          Returns the column name.
 int getRowCount()
          Returns the number of rows.
 long getSessionsCounter()
           
 java.lang.Object getValueAt(int iRow, int iColumn)
          Returns the value of an information items in this model.
 void run()
          Perfoms the Gui update.
 void stop()
          Stops monitoring.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODULE

public static final java.lang.String MODULE
The MODULE name.

See Also:
Constant Field Values
Constructor Detail

SessionMonitorModel

public SessionMonitorModel(int iCheckInterval)
                    throws ASelectConfigException
Initializes the class.

Description:
This method initalizes the class by initializing variables and starting the runner thread for monitoring.

Concurrency issues:
None.

Preconditions:
None.

Postconditions:
None.

Parameters:
iCheckInterval - the monitoring interval (in seconds) to wait for updating the sessions information.
Throws:
ASelectConfigException - on error.
Method Detail

stop

public void stop()
Stops monitoring.


getSessionsCounter

public long getSessionsCounter()
Returns:
the number of pending sessions.

getRowCount

public int getRowCount()
Returns the number of rows.

Specified by:
getRowCount in interface javax.swing.table.TableModel
See Also:
TableModel.getRowCount()

getColumnCount

public int getColumnCount()
Returns the number of columns.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
See Also:
TableModel.getColumnCount()

getValueAt

public java.lang.Object getValueAt(int iRow,
                                   int iColumn)
Returns the value of an information items in this model.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Returns:
the String representation of the item.
See Also:
TableModel.getValueAt(int, int)

getColumnName

public java.lang.String getColumnName(int iIndex)
Returns the column name.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
See Also:
TableModel.getColumnName(int)

run

public void run()
Perfoms the Gui update.

Loops and upon wakeup (monitoring interval), fetches the pending sessions information from the SessionManger.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()


Copyright © 2008 SURFnet BV. All Rights Reserved.