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.

Type support can be configured by passing a custom JCATypeSupport to the constructor.

Author:
carcassi

Constructor Summary
JCADataSource()
          Creates a new data source using pure Java implementation
JCADataSource(Context jcaContext, int monitorMask)
          Creates a new data source using the given context.
JCADataSource(Context jcaContext, int monitorMask, JCATypeSupport typeSupport)
          Creates a new data source using the given context.
JCADataSource(Context jcaContext, int monitorMask, JCATypeSupport typeSupport, boolean dbePropertySupported, boolean varArraySupported)
          Creates a new data source using the given context.
 
Method Summary
 void close()
          Closes the DataSource and the resources associated with it.
protected  ChannelHandler createChannel(java.lang.String channelName)
          Creates a channel handler for the given name.
 Context getContext()
          The context used by the data source.
 int getMonitorMask()
          The monitor mask used for this data source.
 boolean isDbePropertySupported()
          Whether the metadata monitor should be established.
 boolean isVarArraySupported()
          True whether the context can use variable arrays (all array monitor request will have an element count of 0).
static boolean isVarArraySupported(Context context)
          Determines whether the context supports variable arrays or not.
 
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(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(Context jcaContext,
                     int monitorMask,
                     JCATypeSupport typeSupport)
Creates a new data source using the given context. The context will never be closed. The type mapping con be configured with a custom type support.

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

JCADataSource

public JCADataSource(Context jcaContext,
                     int monitorMask,
                     JCATypeSupport typeSupport,
                     boolean dbePropertySupported,
                     boolean varArraySupported)
Creates a new data source using the given context. The context will never be closed. The type mapping con be configured with a custom type support.

Parameters:
jcaContext - the context to be used
monitorMask - Monitor.VALUE, ...
typeSupport - type support to be used
dbePropertySupported - whether metadata monitors should be used
varArraySupported - true if var array should be used
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 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

isDbePropertySupported

public boolean isDbePropertySupported()
Whether the metadata monitor should be established.

Returns:
true if using metadata monitors

createChannel

protected ChannelHandler createChannel(java.lang.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

isVarArraySupported

public boolean isVarArraySupported()
True whether the context can use variable arrays (all array monitor request will have an element count of 0).

Returns:
true if variable size arrays are supported

isVarArraySupported

public static boolean isVarArraySupported(Context context)
Determines whether the context supports variable arrays or not.

Parameters:
context - a JCA Context
Returns:
true if supports variable sized arrays