com.cosylab.epics.caj.cas
Class CASServerMonitor

java.lang.Object
  extended by gov.aps.jca.cas.ServerMonitor
      extended by com.cosylab.epics.caj.cas.CASServerMonitor
All Implemented Interfaces:
gov.aps.jca.cas.ProcessVariableEventCallback, Runnable

public class CASServerMonitor
extends gov.aps.jca.cas.ServerMonitor
implements gov.aps.jca.cas.ProcessVariableEventCallback, Runnable

CAS monitor implementation.

Version:
$id$
Author:
Matej Sekoranja

Field Summary
protected  int dataCount
           
protected  short dataType
           
protected  boolean destoryed
          Flag indicating destroy status.
protected  EventAddResponse handler
           
protected  short mask
          Monitor mask.
protected static int MAX_QUEUE_SIZE
          Max queue size.
protected  gov.aps.jca.dbr.DBR pendingEvent
          Pending event.
protected  LinkedList queue
          Ordered dispatch queue.
protected  boolean submitPending
          Flag indicating pending submit.
protected  CASTransport transport
           
 
Fields inherited from class gov.aps.jca.cas.ServerMonitor
channel, ioid
 
Constructor Summary
CASServerMonitor(gov.aps.jca.cas.ServerChannel channel, int ioid, short mask, EventAddResponse handler, CASTransport transport, short dataType, int dataCount)
           
 
Method Summary
 void canceled()
           
 void destroy()
           
 void postEvent(int select, gov.aps.jca.dbr.DBR event)
           
 void run()
          NOT TO BE CHANGED.
protected  void submit()
          Sumbit to be processed.
 
Methods inherited from class gov.aps.jca.cas.ServerMonitor
getChannel, getIOID, printInfo, printInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mask

protected short mask
Monitor mask.


handler

protected EventAddResponse handler

transport

protected CASTransport transport

dataType

protected short dataType

dataCount

protected int dataCount

queue

protected LinkedList queue
Ordered dispatch queue.


pendingEvent

protected gov.aps.jca.dbr.DBR pendingEvent
Pending event. NOTE: synchronized on queue's monitor.


submitPending

protected boolean submitPending
Flag indicating pending submit. NOTE: synchronized on queue's monitor.


destoryed

protected boolean destoryed
Flag indicating destroy status. NOTE: synchronized on queue's monitor.


MAX_QUEUE_SIZE

protected static final int MAX_QUEUE_SIZE
Max queue size. If limit is reached then older events are replaced with the newer.

See Also:
Constant Field Values
Constructor Detail

CASServerMonitor

public CASServerMonitor(gov.aps.jca.cas.ServerChannel channel,
                        int ioid,
                        short mask,
                        EventAddResponse handler,
                        CASTransport transport,
                        short dataType,
                        int dataCount)
Parameters:
channel -
ioid -
Method Detail

destroy

public void destroy()
Overrides:
destroy in class gov.aps.jca.cas.ServerMonitor
See Also:
ServerMonitor.destroy()

canceled

public void canceled()
See Also:
CompletionCallback.canceled()

run

public final void run()
NOT TO BE CHANGED. Processing is done one by one - to achieve better fairness.

Specified by:
run in interface Runnable

submit

protected void submit()
Sumbit to be processed.


postEvent

public void postEvent(int select,
                      gov.aps.jca.dbr.DBR event)
Specified by:
postEvent in interface gov.aps.jca.cas.ProcessVariableEventCallback
See Also:
ProcessVariableEventCallback.postEvent(int, gov.aps.jca.dbr.DBR)


Copyright © 2004-2013 Cosylab. All Rights Reserved.