com.cosylab.epics.caj.cas
Class ProcessVariableEventDispatcher

java.lang.Object
  extended by com.cosylab.epics.caj.cas.ProcessVariableEventDispatcher
All Implemented Interfaces:
gov.aps.jca.cas.ProcessVariableEventCallback

public class ProcessVariableEventDispatcher
extends Object
implements gov.aps.jca.cas.ProcessVariableEventCallback

Event callback dispatcher (fan-out).

Version:
$id$
Author:
Matej Sekoranja

Field Summary
protected  gov.aps.jca.cas.ProcessVariableEventCallback[] cachedList
           
protected  ArrayList listeners
          List of listeners.
protected  gov.aps.jca.cas.ProcessVariable processVariable
          PV to dispatch for.
 
Constructor Summary
ProcessVariableEventDispatcher(gov.aps.jca.cas.ProcessVariable processVariable)
          Constructor.
 
Method Summary
 void canceled()
           
 gov.aps.jca.cas.ProcessVariable getProcessVariable()
          Get served PV.
 void postEvent(int select, gov.aps.jca.dbr.DBR event)
           
 void registerEventListener(gov.aps.jca.cas.ProcessVariableEventCallback listener)
          Register new listener.
 void setProcessVariable(gov.aps.jca.cas.ProcessVariable processVariable)
          Set served PV (allow PV to be set later to avoid chicken-egg problem).
 void unregisterEventListener(gov.aps.jca.cas.ProcessVariableEventCallback listener)
          Unregister new listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processVariable

protected gov.aps.jca.cas.ProcessVariable processVariable
PV to dispatch for.


listeners

protected ArrayList listeners
List of listeners.


cachedList

protected gov.aps.jca.cas.ProcessVariableEventCallback[] cachedList
Constructor Detail

ProcessVariableEventDispatcher

public ProcessVariableEventDispatcher(gov.aps.jca.cas.ProcessVariable processVariable)
Constructor.

Parameters:
processVariable - PV to dispatch for, can be null.
Method Detail

getProcessVariable

public gov.aps.jca.cas.ProcessVariable getProcessVariable()
Get served PV.

Returns:
the processVariable

setProcessVariable

public void setProcessVariable(gov.aps.jca.cas.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,
                      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)

registerEventListener

public void registerEventListener(gov.aps.jca.cas.ProcessVariableEventCallback listener)
Register new listener.

Parameters:
listener -

unregisterEventListener

public void unregisterEventListener(gov.aps.jca.cas.ProcessVariableEventCallback listener)
Unregister new listener.

Parameters:
listener -

canceled

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


Copyright © 2004-2013 Cosylab. All Rights Reserved.