com.sun.enterprise.connectors.work
Class OneWork

java.lang.Object
  extended by com.sun.enterprise.connectors.work.OneWork
All Implemented Interfaces:
com.sun.corba.ee.spi.orbutil.threadpool.Work

public final class OneWork
extends java.lang.Object
implements com.sun.corba.ee.spi.orbutil.threadpool.Work

Represents one piece of work that will be submitted to the workqueue.

Author:
Binod P.G

Method Summary
 void doWork()
          This method is executed by thread pool as the basic work operation.
 long getEnqueueTime()
          Retrieves the time at which this work is enqueued
 java.lang.String getName()
          Retrieves the name of the work.
 void log(java.lang.String message)
           
 void setEnqueueTime(long tme)
          Time at which this work is enqueued.
 void setName(java.lang.String name)
           
 java.lang.String toString()
          Retrieves the string representation of work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

doWork

public void doWork()
This method is executed by thread pool as the basic work operation.

Specified by:
doWork in interface com.sun.corba.ee.spi.orbutil.threadpool.Work

log

public void log(java.lang.String message)

setEnqueueTime

public void setEnqueueTime(long tme)
Time at which this work is enqueued.

Specified by:
setEnqueueTime in interface com.sun.corba.ee.spi.orbutil.threadpool.Work
Parameters:
tme - Time in milliseconds.

getEnqueueTime

public long getEnqueueTime()
Retrieves the time at which this work is enqueued

Specified by:
getEnqueueTime in interface com.sun.corba.ee.spi.orbutil.threadpool.Work
Returns:
Time in milliseconds.

getName

public java.lang.String getName()
Retrieves the name of the work.

Specified by:
getName in interface com.sun.corba.ee.spi.orbutil.threadpool.Work
Returns:
Name of the work.

setName

public void setName(java.lang.String name)

toString

public java.lang.String toString()
Retrieves the string representation of work.

Overrides:
toString in class java.lang.Object
Returns:
String representation of work.


Copyright © 2012 GlassFish Community. All Rights Reserved.