|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.epics.pvmanager.ChannelHandler<gov.aps.jca.event.MonitorEvent>
org.epics.pvmanager.jca.JCAChannelHandler
public class JCAChannelHandler
A ChannelHandler for the JCADataSource.
NOTE: this class is extensible as per Bastian request so that DESY can hook a different type factory. This is a temporary measure until the problem is solved in better, more general way, so that data sources can work only with data source specific types, while allowing conversions to normalized type through operators. The contract of this class is, therefore, expected to change.
Related changes are marked so that they are not accidentally removed in the meantime, and can be intentionally removed when a better solution is implemented.
Field Summary | |
---|---|
protected Class<?> |
cacheType
|
protected gov.aps.jca.dbr.DBR |
metadata
|
protected gov.aps.jca.event.MonitorListener |
monitorListener
|
protected TypeFactory |
vTypeFactory
|
Constructor Summary | |
---|---|
JCAChannelHandler(String channelName,
gov.aps.jca.Context context,
int monitorMask)
|
Method Summary | |
---|---|
void |
addMonitor(Collector<?> collector,
ValueCache<?> cache,
ExceptionHandler handler)
Used by the data source to add a read request on the channel managed by this handler. |
void |
connect(ExceptionHandler handler)
Used by the handler to open the connection. |
void |
disconnect(ExceptionHandler handler)
Used by the handler to close the connection. |
boolean |
isConnected()
Returns true if it is connected. |
protected void |
setup(gov.aps.jca.Channel channel)
|
boolean |
updateCache(gov.aps.jca.event.MonitorEvent event,
ValueCache<?> cache)
Used by the handler to forward values. |
void |
write(Object newValue,
ChannelWriteCallback callback)
Implements a write operation. |
Methods inherited from class org.epics.pvmanager.ChannelHandler |
---|
addWriter, getChannelName, getReadUsageCounter, getUsageCounter, getWriteUsageCounter, processValue, removeMonitor, removeWrite |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected volatile Class<?> cacheType
protected volatile TypeFactory vTypeFactory
protected gov.aps.jca.dbr.DBR metadata
protected final gov.aps.jca.event.MonitorListener monitorListener
Constructor Detail |
---|
public JCAChannelHandler(String channelName, gov.aps.jca.Context context, int monitorMask)
Method Detail |
---|
public void addMonitor(Collector<?> collector, ValueCache<?> cache, ExceptionHandler handler)
ChannelHandler
addMonitor
in class ChannelHandler<gov.aps.jca.event.MonitorEvent>
collector
- collector to be notified at each updatecache
- cache to contain the new valuehandler
- to be notified in case of errorspublic void connect(ExceptionHandler handler)
ChannelHandler
connect
in class ChannelHandler<gov.aps.jca.event.MonitorEvent>
handler
- to be notified in case of errorsprotected void setup(gov.aps.jca.Channel channel) throws gov.aps.jca.CAException
gov.aps.jca.CAException
public void disconnect(ExceptionHandler handler)
ChannelHandler
disconnect
in class ChannelHandler<gov.aps.jca.event.MonitorEvent>
handler
- to be notified in case of errorspublic void write(Object newValue, ChannelWriteCallback callback)
ChannelHandler
write
in class ChannelHandler<gov.aps.jca.event.MonitorEvent>
newValue
- new value to be writtencallback
- called when done or on errorpublic boolean updateCache(gov.aps.jca.event.MonitorEvent event, ValueCache<?> cache)
ChannelHandler
updateCache
in class ChannelHandler<gov.aps.jca.event.MonitorEvent>
event
- the payloadcache
- the cache where to store the new value
public boolean isConnected()
ChannelHandler
isConnected
in class ChannelHandler<gov.aps.jca.event.MonitorEvent>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |