Package com.cosylab.epics.caj.cas
Class CASServerMonitor
- java.lang.Object
-
- gov.aps.jca.cas.ServerMonitor
-
- com.cosylab.epics.caj.cas.CASServerMonitor
-
- All Implemented Interfaces:
ProcessVariableEventCallback,Runnable
public class CASServerMonitor extends ServerMonitor implements ProcessVariableEventCallback, Runnable
CAS monitor implementation.- Version:
- $id$
- Author:
- Matej Sekoranja
-
-
Field Summary
Fields Modifier and Type Field Description protected intdataCountprotected shortdataTypeprotected booleandestoryedFlag indicating destroy status.protected EventAddResponsehandlerprotected shortmaskMonitor mask.protected static intMAX_QUEUE_SIZEMax queue size.protected DBRpendingEventPending event.protected LinkedListqueueOrdered dispatch queue.protected booleansubmitPendingFlag indicating pending submit.protected CASTransporttransport-
Fields inherited from class gov.aps.jca.cas.ServerMonitor
channel, ioid
-
-
Constructor Summary
Constructors Constructor Description CASServerMonitor(ServerChannel channel, int ioid, short mask, EventAddResponse handler, CASTransport transport, short dataType, int dataCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcanceled()voiddestroy()Destroy monitor.voidpostEvent(int select, DBR event)Notify about process variable event.voidrun()NOT TO BE CHANGED.protected voidsubmit()Sumbit to be processed.-
Methods inherited from class gov.aps.jca.cas.ServerMonitor
getChannel, getIOID, printInfo, printInfo
-
-
-
-
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 DBR pendingEvent
Pending event. NOTE: synchronized onqueue's monitor.
-
submitPending
protected boolean submitPending
Flag indicating pending submit. NOTE: synchronized onqueue's monitor.
-
destoryed
protected boolean destoryed
Flag indicating destroy status. NOTE: synchronized onqueue'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(ServerChannel channel, int ioid, short mask, EventAddResponse handler, CASTransport transport, short dataType, int dataCount)
- Parameters:
channel- ServerChannelioid- event Idmask- monitor maskhandler- EventAddResponsetransport- CASTransportdataType- data typedataCount- data count
-
-
Method Detail
-
destroy
public void destroy()
Description copied from class:ServerMonitorDestroy monitor. This method MUST BE called if this it is overriden.- Overrides:
destroyin classServerMonitor- 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.
-
submit
protected void submit()
Sumbit to be processed.
-
postEvent
public void postEvent(int select, DBR event)Description copied from interface:ProcessVariableEventCallbackNotify about process variable event.- Specified by:
postEventin interfaceProcessVariableEventCallback- Parameters:
select-Monitor.[mask]event type.event- event of type DBR_TIME_where type is of ProcessVariable.getType().- See Also:
ProcessVariableEventCallback.postEvent(int, gov.aps.jca.dbr.DBR)
-
-