public class JCADataSourceBuilder extends Object
JCADataSource
. Given the moderate number of configuration
parameters, the builder allows to set only the ones the user needs to set.
Refer to each parameter for their meaning and default.
Constructor and Description |
---|
JCADataSourceBuilder() |
Modifier and Type | Method and Description |
---|---|
JCADataSource |
build()
Creates a new data source.
|
JCADataSourceBuilder |
dbePropertySupported(boolean dbePropertySupported)
Whether a separate monitor should be used for listening to metadata
changes.
|
JCADataSourceBuilder |
honorZeroPrecision(boolean honorZeroPrecision)
If true, the formatter returned by the VType will show
no decimal digits (assumes it was configured);
if false, it will return all the digit (assumes it wasn't configured).
|
JCADataSourceBuilder |
jcaContext(gov.aps.jca.Context jcaContext)
The jca context to use.
|
JCADataSourceBuilder |
jcaContextClass(String className)
The class name for the implementation of JCA.
|
JCADataSourceBuilder |
monitorMask(int monitorMask)
The mask used for the monitor notifications.
|
JCADataSourceBuilder |
rtypValueOnly(boolean rtypValueOnly)
If true, for fields that match ".*\.RTYP.*" only the value will be
read; alarm and time will be created at client side.
|
JCADataSourceBuilder |
typeSupport(JCATypeSupport typeSupport)
Changes the way JCA DBR types are mapped to types supported in pvamanger.
|
JCADataSourceBuilder |
varArraySupported(boolean varArraySupported)
If true, monitors will setup using "0" length, which will make
the server a variable length array in return (if supported) or a "0"
length array (if not supported).
|
public JCADataSourceBuilder jcaContextClass(String className)
Default is JCALibrary.CHANNEL_ACCESS_JAVA
.
className
- the class name of the jca implementationpublic JCADataSourceBuilder jcaContext(gov.aps.jca.Context jcaContext)
By default, will be automatically
created from the jcaContextClass(java.lang.String)
.
jcaContext
- the contextpublic JCADataSourceBuilder monitorMask(int monitorMask)
Monitor.VALUE
, Monitor.ALARM
, ...
Default is Monitor.VALUE | Monitor.ALARM
.
monitorMask
- the monitor maskpublic JCADataSourceBuilder typeSupport(JCATypeSupport typeSupport)
Default includes support for the VTypes (i.e. JCAVTypeAdapterSet
).
typeSupport
- the custom type supportpublic JCADataSourceBuilder dbePropertySupported(boolean dbePropertySupported)
Default is false.
dbePropertySupported
- if true, metadata changes will trigger notificationpublic JCADataSourceBuilder varArraySupported(boolean varArraySupported)
By default it tries to auto-detected whether the client library implements the proper checks.
varArraySupported
- true will enablepublic JCADataSourceBuilder rtypValueOnly(boolean rtypValueOnly)
Default is false.
rtypValueOnly
- true will enablepublic JCADataSourceBuilder honorZeroPrecision(boolean honorZeroPrecision)
Default is true.
honorZeroPrecision
- whether the formatter should treat 0 precision as meaningfulpublic JCADataSource build()
Copyright © 2010–2015. All rights reserved.