Package com.cosylab.epics.caj.cas
Class ProcessVariableEventDispatcher
- java.lang.Object
-
- com.cosylab.epics.caj.cas.ProcessVariableEventDispatcher
-
- All Implemented Interfaces:
ProcessVariableEventCallback
public class ProcessVariableEventDispatcher extends Object implements ProcessVariableEventCallback
Event callback dispatcher (fan-out).- Version:
- $id$
- Author:
- Matej Sekoranja
-
-
Field Summary
Fields Modifier and Type Field Description protected ProcessVariableEventCallback[]cachedListprotected ArrayListlistenersList of listeners.protected ProcessVariableprocessVariablePV to dispatch for.
-
Constructor Summary
Constructors Constructor Description ProcessVariableEventDispatcher(ProcessVariable processVariable)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcanceled()ProcessVariablegetProcessVariable()Get served PV.voidpostEvent(int select, DBR event)Notify about process variable event.voidregisterEventListener(ProcessVariableEventCallback listener)Register new listener.voidsetProcessVariable(ProcessVariable processVariable)Set served PV (allow PV to be set later to avoid chicken-egg problem).voidunregisterEventListener(ProcessVariableEventCallback listener)Unregister new listener.
-
-
-
Field Detail
-
processVariable
protected ProcessVariable processVariable
PV to dispatch for.
-
listeners
protected ArrayList listeners
List of listeners.
-
cachedList
protected ProcessVariableEventCallback[] cachedList
-
-
Constructor Detail
-
ProcessVariableEventDispatcher
public ProcessVariableEventDispatcher(ProcessVariable processVariable)
Constructor.- Parameters:
processVariable- PV to dispatch for, can benull.
-
-
Method Detail
-
getProcessVariable
public ProcessVariable getProcessVariable()
Get served PV.- Returns:
- the processVariable
-
setProcessVariable
public void setProcessVariable(ProcessVariable processVariable)
Set served PV (allow PV to be set later to avoid chicken-egg problem).- Parameters:
processVariable- the processVariable to set
-
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)
-
registerEventListener
public void registerEventListener(ProcessVariableEventCallback listener)
Register new listener.- Parameters:
listener-
-
unregisterEventListener
public void unregisterEventListener(ProcessVariableEventCallback listener)
Unregister new listener.- Parameters:
listener-
-
canceled
public void canceled()
- See Also:
CompletionCallback.canceled()
-
-