jason.core.pool
Class SocketTask

java.lang.Object
  |
  +--jason.core.pool.AbstractTask
        |
        +--jason.core.pool.SocketTask
All Implemented Interfaces:
Task

public class SocketTask
extends AbstractTask

Created Fri May 24 15:17:41 2002

This class is a task for handling a user Socket. It will automatically close the Socket.

Author:
Alexandre Brillant (abrillant@wanadoo.fr)

Field Summary
protected  java.net.Socket socket
           
 
Constructor Summary
SocketTask(java.net.Socket socket)
           
 
Method Summary
 java.net.Socket getSocket()
           
protected  void run()
          User must override this method and inserts its handling code
 void runTask()
          Run the user code and close the socket
 
Methods inherited from class jason.core.pool.AbstractTask
getTaskContext, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socket

protected java.net.Socket socket
Constructor Detail

SocketTask

public SocketTask(java.net.Socket socket)
Method Detail

runTask

public void runTask()
Run the user code and close the socket

Specified by:
runTask in interface Task
Overrides:
runTask in class AbstractTask

run

protected void run()
User must override this method and inserts its handling code

Specified by:
run in class AbstractTask

getSocket

public java.net.Socket getSocket()
Returns:
the user socket