public abstract class ClientThread extends PropertyChangeEventGeneratingClass implements java.lang.Runnable, java.awt.event.ActionListener
PropertyChangeEventGeneratingClass.EventHandler
Modifier and Type | Field and Description |
---|---|
protected AbstractServer |
caller |
protected SocketWrapper |
socketWrapper |
Modifier | Constructor and Description |
---|---|
protected |
ClientThread(AbstractServer caller,
int workerID)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent arg0) |
protected void |
closeSocket() |
protected void |
fireCurrentStatus()
This method fires the current status of the worker
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
This method serves to send a PropertyChangeEvent instance on the Event Dispatch Thread.
|
protected java.util.Map<java.lang.String,java.beans.PropertyChangeEvent> |
getCurrentStatusMap() |
protected SocketWrapper |
getSocket() |
protected int |
getWorkerID()
This method returns the ID of the worker.
|
protected abstract java.lang.Object |
processRequest() |
protected void |
restartAction() |
void |
run() |
protected void |
start() |
addPropertyChangeListener, removePropertyChangeListener, setProgress
protected final AbstractServer caller
protected SocketWrapper socketWrapper
protected ClientThread(AbstractServer caller, int workerID)
caller
- a CapsisServer instanceworkerID
- an integer that serves to identify this client threadpublic void run()
run
in interface java.lang.Runnable
protected abstract java.lang.Object processRequest() throws java.lang.Exception
java.lang.Exception
public void actionPerformed(java.awt.event.ActionEvent arg0)
actionPerformed
in interface java.awt.event.ActionListener
protected void restartAction()
protected void start()
protected int getWorkerID()
protected void closeSocket() throws java.io.IOException
java.io.IOException
protected SocketWrapper getSocket()
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
PropertyChangeEventGeneratingClass
firePropertyChange
in class PropertyChangeEventGeneratingClass
propertyName
- the name of the propertyoldValue
- the former value of this property if anynewValue
- the current value of this propertyprotected void fireCurrentStatus()
protected java.util.Map<java.lang.String,java.beans.PropertyChangeEvent> getCurrentStatusMap()