ikrs.yuccasrv.ui
Class ServerSocketTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by ikrs.yuccasrv.ui.ServerSocketTableModel
All Implemented Interfaces:
BindListener, java.io.Serializable, javax.swing.table.TableModel

public class ServerSocketTableModel
extends javax.swing.table.AbstractTableModel
implements BindListener

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ServerSocketTableModel()
           
 
Method Summary
 void finalize(long time, java.util.concurrent.TimeUnit unit)
          This method will be called if the SocketManager is going to terminate.
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
protected  java.util.Map<java.lang.String,BasicType> getRow(int row)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int column)
           
 int resolveTableRowBySocketID(java.util.UUID socketID)
           
 void serverAcceptedTCPConnection(BindManager source, java.util.UUID socketID, java.net.Socket sock, ConnectionUserID userID)
           
 void serverAcceptedUDPConnection(BindManager source, java.util.UUID socketID, java.net.DatagramSocket sock, ConnectionUserID userID)
           
 void serverClosed(BindManager source, java.util.UUID socketID)
           
 void serverCreated(BindManager source, java.util.UUID socketID)
           
 void serverError(BindManager source, java.util.UUID socketID, java.lang.Exception e, boolean isTraumatic)
           
 
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
 

Constructor Detail

ServerSocketTableModel

public ServerSocketTableModel()
Method Detail

getRow

protected java.util.Map<java.lang.String,BasicType> getRow(int row)

resolveTableRowBySocketID

public int resolveTableRowBySocketID(java.util.UUID socketID)

serverCreated

public void serverCreated(BindManager source,
                          java.util.UUID socketID)
Specified by:
serverCreated in interface BindListener
Parameters:
source - The BindManager that reports the event.
socketID - A unique ID to identify the created socket by the use of BindManager.getServer*( socketID ).

serverError

public void serverError(BindManager source,
                        java.util.UUID socketID,
                        java.lang.Exception e,
                        boolean isTraumatic)
Specified by:
serverError in interface BindListener
Parameters:
source - The BindManager that reports the event.
socketID - The server's unique ID.
e - The reported exception.
isTraumatic - This flag tell if the server socket can still be used or if it's (probably) broken and should be restarted. In the second case the BindManager will automatically close and remove the socket to free the resources.

serverAcceptedTCPConnection

public void serverAcceptedTCPConnection(BindManager source,
                                        java.util.UUID socketID,
                                        java.net.Socket sock,
                                        ConnectionUserID userID)
Specified by:
serverAcceptedTCPConnection in interface BindListener
Parameters:
source - The BindManager that reports the event.
sockedID - The server socket's unique ID.
sock - The accepted connection socket.

serverAcceptedUDPConnection

public void serverAcceptedUDPConnection(BindManager source,
                                        java.util.UUID socketID,
                                        java.net.DatagramSocket sock,
                                        ConnectionUserID userID)
Specified by:
serverAcceptedUDPConnection in interface BindListener
Parameters:
source - The BindManager that reports the event.
sockedID - The server socket's unique ID.
sock - The accepted connection socket.

serverClosed

public void serverClosed(BindManager source,
                         java.util.UUID socketID)
Specified by:
serverClosed in interface BindListener
Parameters:
source - The BindManager that reports the event.
sockedID - The server socket's unique ID.

finalize

public void finalize(long time,
                     java.util.concurrent.TimeUnit unit)
Description copied from interface: BindListener
This method will be called if the SocketManager is going to terminate. All associated BindListener MUST terminate within the given time.

Specified by:
finalize in interface BindListener
Parameters:
time - The time value all dependent child threads have to terminate in.
unit - The time unit.

getColumnName

public java.lang.String getColumnName(int column)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface javax.swing.table.TableModel

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Specified by:
getValueAt in interface javax.swing.table.TableModel