org.snmp4j.util
Class DefaultThreadFactory.WorkerThread

java.lang.Object
  extended by org.snmp4j.util.DefaultThreadFactory.WorkerThread
All Implemented Interfaces:
java.lang.Runnable, WorkerTask
Enclosing class:
DefaultThreadFactory

public class DefaultThreadFactory.WorkerThread
extends java.lang.Object
implements WorkerTask


Constructor Summary
DefaultThreadFactory.WorkerThread(java.lang.String name, WorkerTask task)
           
 
Method Summary
 void interrupt()
          Interrupts this task.
 void join()
          Waits until this task has been finished.
 void run()
           
 void terminate()
          The WorkerPool might call this method to hint the active WorkTask instance to complete execution as soon as possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultThreadFactory.WorkerThread

public DefaultThreadFactory.WorkerThread(java.lang.String name,
                                         WorkerTask task)
Method Detail

terminate

public void terminate()
Description copied from interface: WorkerTask
The WorkerPool might call this method to hint the active WorkTask instance to complete execution as soon as possible.

Specified by:
terminate in interface WorkerTask

join

public void join()
          throws java.lang.InterruptedException
Description copied from interface: WorkerTask
Waits until this task has been finished.

Specified by:
join in interface WorkerTask
Throws:
java.lang.InterruptedException

run

public void run()
Specified by:
run in interface java.lang.Runnable

interrupt

public void interrupt()
Description copied from interface: WorkerTask
Interrupts this task.

Specified by:
interrupt in interface WorkerTask
See Also:
Thread.interrupt()

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.