Sun Adapter for TCP/IP HL7

com.stc.connector.tcpip.model.server
Class TCPIPServerWorkManager

java.lang.Object
  extended by com.stc.connector.tcpip.model.server.TCPIPServerWorkManager
All Implemented Interfaces:
javax.resource.spi.work.WorkManager

public class TCPIPServerWorkManager
extends java.lang.Object
implements javax.resource.spi.work.WorkManager

This class is not a full-featured WorkManager. It is ONLY used for my RA non-managed mode test.

Version:
cvs revision: $Revision: 1.3 $ Last Modified: $Date: 2005/09/03 06:33:20 $
Author:
Harry Liu

Field Summary
static java.lang.String version
           
 
Fields inherited from interface javax.resource.spi.work.WorkManager
IMMEDIATE, INDEFINITE, UNKNOWN
 
Constructor Summary
TCPIPServerWorkManager()
          Constructor
 
Method Summary
 void doWork(javax.resource.spi.work.Work work)
          Accepts a Work instance for processing.
 void doWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
          Accepts a Work instance for processing.
 void scheduleWork(javax.resource.spi.work.Work work)
          Accepts a Work instance for processing.
 void scheduleWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
          Accepts a Work instance for processing.
 long startWork(javax.resource.spi.work.Work work)
          Accepts a Work instance for processing.
 long startWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
          Accepts a Work instance for processing.
 void stop()
          Method stop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static final java.lang.String version
See Also:
Constant Field Values
Constructor Detail

TCPIPServerWorkManager

public TCPIPServerWorkManager()
Constructor

Method Detail

doWork

public void doWork(javax.resource.spi.work.Work work)
            throws javax.resource.spi.work.WorkException
Accepts a Work instance for processing. This call blocks until the Work instance completes execution. There is no guarantee on when the accepted Work instance would start execution ie., there is no time constraint to start execution.

Specified by:
doWork in interface javax.resource.spi.work.WorkManager
Parameters:
work - The Work object to process.
Throws:
javax.resource.spi.work.WorkException - If there was a problem processing the Work instance.
See Also:
WorkManager.doWork(Work)

doWork

public void doWork(javax.resource.spi.work.Work work,
                   long startTimeout,
                   javax.resource.spi.work.ExecutionContext execContext,
                   javax.resource.spi.work.WorkListener workListener)
            throws javax.resource.spi.work.WorkException
Accepts a Work instance for processing. This call blocks until the Work instance completes execution.

Specified by:
doWork in interface javax.resource.spi.work.WorkManager
Parameters:
work - The Work object to process.
startTimeout - time duration (in milliseconds) within which the execution of the Work instance must start
execContext - an object containing the execution context with which the submitted Work instance must be executed
workListener - an object which would be notified when the various Work processing events (work accepted, work rejected, work started, work completed) occur.
Throws:
javax.resource.spi.work.WorkException - If there was a problem processing the Work instance.
See Also:
WorkManager.doWork(Work, long, ExecutionContext, WorkListener)

startWork

public long startWork(javax.resource.spi.work.Work work)
               throws javax.resource.spi.work.WorkException
Accepts a Work instance for processing. This call blocks until the Work instance starts execution but not until its completion. There is no guarantee on when the accepted Work instance would start execution ie., there is no time constraint to start execution.

Specified by:
startWork in interface javax.resource.spi.work.WorkManager
Parameters:
work - The Work object to process.
Returns:
long The time elapsed (in milliseconds) from Work acceptance until start of execution
Throws:
javax.resource.spi.work.WorkException - If there was a problem processing the Work instance.
See Also:
WorkManager.startWork(Work)

startWork

public long startWork(javax.resource.spi.work.Work work,
                      long startTimeout,
                      javax.resource.spi.work.ExecutionContext execContext,
                      javax.resource.spi.work.WorkListener workListener)
               throws javax.resource.spi.work.WorkException
Accepts a Work instance for processing. This call blocks until the Work instance starts execution but not until its completion. There is no guarantee on when the accepted Work instance would start execution ie., there is no time constraint to start execution.

Specified by:
startWork in interface javax.resource.spi.work.WorkManager
Parameters:
work - The Work object to process.
startTimeout - time duration (in milliseconds) within which the execution of the Work instance must start
execContext - an object containing the execution context with which the submitted Work instance must be executed
workListener - an object which would be notified when the various Work processing events (work accepted, work rejected, work started, work completed) occur.
Returns:
long The time elapsed (in milliseconds) from Work acceptance until start of execution
Throws:
javax.resource.spi.work.WorkException - If there was a problem processing the Work instance.
See Also:
WorkManager.startWork(Work, long, ExecutionContext, WorkListener)

scheduleWork

public void scheduleWork(javax.resource.spi.work.Work work)
                  throws javax.resource.spi.work.WorkException
Accepts a Work instance for processing. This call does not block and returns immediately once a Work instance has been accepted for processing. There is no guarantee on when the submitted Work instance would start execution ie., there is no time constraint to start execution.

Specified by:
scheduleWork in interface javax.resource.spi.work.WorkManager
Parameters:
work - The Work object to process.
Throws:
javax.resource.spi.work.WorkException - If there was a problem processing the Work instance.
See Also:
WorkManager.scheduleWork(Work)

scheduleWork

public void scheduleWork(javax.resource.spi.work.Work work,
                         long startTimeout,
                         javax.resource.spi.work.ExecutionContext execContext,
                         javax.resource.spi.work.WorkListener workListener)
                  throws javax.resource.spi.work.WorkException
Accepts a Work instance for processing. This call does not block and returns immediately once a Work instance has been accepted for processing.

Specified by:
scheduleWork in interface javax.resource.spi.work.WorkManager
Parameters:
work - The Work object to process.
startTimeout - time duration (in milliseconds) within which the execution of the Work instance must start
execContext - an object containing the execution context with which the submitted Work instance must be executed
workListener - an object which would be notified when the various Work processing events (work accepted, work rejected, work started, work completed) occur.
Throws:
javax.resource.spi.work.WorkException - If there was a problem processing the Work instance.
See Also:
WorkManager.scheduleWork(Work, long, ExecutionContext, WorkListener)

stop

public void stop()
Method stop.


Sun Adapter for TCP/IP HL7