Sun Adapter for TCP/IP HL7

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

java.lang.Object
  extended by java.util.TimerTask
      extended by com.stc.connector.tcpip.model.server.TCPIPServerMonitorTask
All Implemented Interfaces:
com.stc.connector.management.jca.system.mbeans.LifeCycle, java.lang.Runnable

public class TCPIPServerMonitorTask
extends java.util.TimerTask
implements com.stc.connector.management.jca.system.mbeans.LifeCycle

TCPIP Server Monitor Task (sub work) which is started from TCPIP Server ActivationSpec.

Version:
cvs revision: $Revision: 1.17 $ Last Modified: $Date: 2008/04/23 07:15:25 $
Author:
Harry Liu

Field Summary
static java.lang.String version
           
 
Constructor Summary
TCPIPServerMonitorTask(TCPIPServerEndpoint aEndpoint)
          Creates a new instance of TCPIPServerMonitorTask
 
Method Summary
 boolean cancel()
           
 TCPIPServerEndpoint getEwayEndpoint()
          Returns the TCPIPServerEwayActivationSpec.
 com.stc.connector.management.util.ObjectReference getMonitor()
           
 Scheduler getMonitorScheduler()
           
 TCPIPServerMonitor getMonitorWork()
          Returns the monitorWork.
 java.util.Vector getWorkerSchedulerList()
           
 java.util.Vector getWorkerTaskList()
           
 java.util.Vector getWorkerWorkList()
           
 boolean isRunning()
          Returns the running.
 boolean isStarted()
           
 boolean isSuspendedByMonitor()
           
 void run()
          When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
 void setMonitorScheduler(Scheduler scheduler)
           
 void setMonitorWork(TCPIPServerMonitor monitorWork)
          Sets the monitorWork.
 void setSuspendedByMonitor(boolean b)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.util.TimerTask
scheduledExecutionTime
 
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

TCPIPServerMonitorTask

public TCPIPServerMonitorTask(TCPIPServerEndpoint aEndpoint)
Creates a new instance of TCPIPServerMonitorTask

Parameters:
aEndpoint - The TCPIPServerEwayActivationSpec.
Method Detail

run

public void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread. The general contract of the method run is that it may take any action whatsoever.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask
See Also:
Runnable.run()

cancel

public boolean cancel()
Overrides:
cancel in class java.util.TimerTask
See Also:
TimerTask.cancel()

isRunning

public boolean isRunning()
Returns the running.

Returns:
boolean

getEwayEndpoint

public TCPIPServerEndpoint getEwayEndpoint()
Returns the TCPIPServerEwayActivationSpec.

Returns:
TCPIPServerEwayActivationSpec

getMonitorWork

public TCPIPServerMonitor getMonitorWork()
Returns the monitorWork.

Returns:
TCPIPServerMonitor

getMonitorScheduler

public Scheduler getMonitorScheduler()
Returns:
Scheduler

setMonitorScheduler

public void setMonitorScheduler(Scheduler scheduler)
Parameters:
scheduler - sets the scheduler instance

setMonitorWork

public void setMonitorWork(TCPIPServerMonitor monitorWork)
Sets the monitorWork.

Parameters:
monitorWork - The monitorWork to set

isSuspendedByMonitor

public boolean isSuspendedByMonitor()
Returns:
boolean

setSuspendedByMonitor

public void setSuspendedByMonitor(boolean b)
Parameters:
b - value to set

getWorkerSchedulerList

public java.util.Vector getWorkerSchedulerList()
Returns:
Vector

getWorkerTaskList

public java.util.Vector getWorkerTaskList()
Returns:
Vector

getWorkerWorkList

public java.util.Vector getWorkerWorkList()
Returns:
Vector

start

public void start()
Specified by:
start in interface com.stc.connector.management.jca.system.mbeans.LifeCycle
See Also:
LifeCycle.start()

stop

public void stop()
Specified by:
stop in interface com.stc.connector.management.jca.system.mbeans.LifeCycle
See Also:
LifeCycle.stop()

isStarted

public boolean isStarted()
Specified by:
isStarted in interface com.stc.connector.management.jca.system.mbeans.LifeCycle
See Also:
LifeCycle.isStarted()

getMonitor

public com.stc.connector.management.util.ObjectReference getMonitor()

Sun Adapter for TCP/IP HL7