fulmine.util.concurrent
Class Task<TASK_TYPE>

java.lang.Object
  extended by fulmine.util.concurrent.Task<TASK_TYPE>
Type Parameters:
TASK_TYPE - the type of task
All Implemented Interfaces:
Runnable

public final class Task<TASK_TYPE>
extends Object
implements Runnable

Encapsulates a task to process using the provided ITaskHandler. This object is not active and is required to be run using a Thread.

Author:
Ramon Servadei

Constructor Summary
Task(ITaskHandler<TASK_TYPE> handler, TASK_TYPE task)
          Construct this async task with the handler and task to process
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 void run()
          Executes the task using the handler.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Task

public Task(ITaskHandler<TASK_TYPE> handler,
            TASK_TYPE task)
Construct this async task with the handler and task to process

Parameters:
handler - the handler
task - the task to process
Method Detail

run

public void run()
Executes the task using the handler.

Specified by:
run in interface Runnable

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2007-2009. All Rights Reserved.