org.epics.pvmanager.jca
Class JCADataSource

java.lang.Object
  extended by org.epics.pvmanager.DataSource
      extended by org.epics.pvmanager.jca.JCADataSource

public class JCADataSource
extends DataSource

A data source that uses jca.

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.

Author:
carcassi

Constructor Summary
JCADataSource()
          Creates a new data source using pure Java implementation
JCADataSource(gov.aps.jca.Context jcaContext, int monitorMask)
          Creates a new data source using the given context.
JCADataSource(String className, int monitorMask)
          Creates a new data source using the className to create the context.
 
Method Summary
 void close()
          Closes the DataSource and the resources associated with it.
protected  ChannelHandler<?> createChannel(String channelName)
          Creates a channel handler for the given name.
 gov.aps.jca.Context getContext()
          The context used by the data source.
 int getMonitorMask()
          The monitor mask used for this data source.
 
Methods inherited from class org.epics.pvmanager.DataSource
concludeWrite, connect, disconnect, getChannels, isWriteable, prepareWrite, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCADataSource

public JCADataSource()
Creates a new data source using pure Java implementation


JCADataSource

public JCADataSource(gov.aps.jca.Context jcaContext,
                     int monitorMask)
Creates a new data source using the given context. The context will never be closed.

Parameters:
jcaContext - the context to be used
monitorMask - Monitor.VALUE, ...

JCADataSource

public JCADataSource(String className,
                     int monitorMask)
Creates a new data source using the className to create the context.

Parameters:
className - JCALibrary.CHANNEL_ACCESS_JAVA, JCALibrary.JNI_THREAD_SAFE, ...
monitorMask - Monitor.VALUE, ...
Method Detail

close

public void close()
Description copied from class: DataSource
Closes the DataSource and the resources associated with it.

Overrides:
close in class DataSource

getContext

public gov.aps.jca.Context getContext()
The context used by the data source.

Returns:
the data source context

getMonitorMask

public int getMonitorMask()
The monitor mask used for this data source.

Returns:
the monitor mask

createChannel

protected ChannelHandler<?> createChannel(String channelName)
Description copied from class: DataSource
Creates a channel handler for the given name. In the simplest case, this is the only method a data source needs to implement.

Specified by:
createChannel in class DataSource
Parameters:
channelName - the name for a new channel
Returns:
a new handler


Copyright © 2011. All Rights Reserved.