public abstract class JCATypeAdapter extends Object implements DataSourceTypeAdapter<JCAConnectionPayload,JCAMessagePayload>
Constructor and Description |
---|
JCATypeAdapter(Class<?> typeClass,
gov.aps.jca.dbr.DBRType epicsValueType,
gov.aps.jca.dbr.DBRType epicsMetaType,
Boolean array)
Creates a new type adapter.
|
Modifier and Type | Method and Description |
---|---|
abstract Object |
createValue(gov.aps.jca.dbr.DBR value,
gov.aps.jca.dbr.DBR metadata,
JCAConnectionPayload connPayload)
Given the value and the (optional) metadata, will create the new value.
|
Object |
getSubscriptionParameter(ValueCache cache,
JCAConnectionPayload connPayload)
The parameters required to open a monitor for the channel.
|
int |
match(ValueCache<?> cache,
JCAConnectionPayload connPayload)
Determines whether the converter can take values from the channel
described by the connection payload and transform them in a
type required by the cache.
|
boolean |
updateCache(ValueCache cache,
JCAConnectionPayload connPayload,
JCAMessagePayload message)
Takes the information in the message and updates the cache.
|
public JCATypeAdapter(Class<?> typeClass, gov.aps.jca.dbr.DBRType epicsValueType, gov.aps.jca.dbr.DBRType epicsMetaType, Boolean array)
typeClass
- the java type this adapter will createepicsValueType
- the epics type used for the monitorepicsMetaType
- the epics type for the get at connection time; null if no metadata is neededarray
- true whether this will require an array typepublic int match(ValueCache<?> cache, JCAConnectionPayload connPayload)
DataSourceTypeAdapter
match
in interface DataSourceTypeAdapter<JCAConnectionPayload,JCAMessagePayload>
cache
- the cache where data will need to be writtenconnPayload
- the connection informationpublic Object getSubscriptionParameter(ValueCache cache, JCAConnectionPayload connPayload)
DataSourceTypeAdapter
For channels multiplexed on a single subscription, this method is never used.
getSubscriptionParameter
in interface DataSourceTypeAdapter<JCAConnectionPayload,JCAMessagePayload>
cache
- the cache where data will need to be writtenconnPayload
- the connection informationpublic boolean updateCache(ValueCache cache, JCAConnectionPayload connPayload, JCAMessagePayload message)
DataSourceTypeAdapter
updateCache
in interface DataSourceTypeAdapter<JCAConnectionPayload,JCAMessagePayload>
cache
- cache to be updatedconnPayload
- the connection informationmessage
- the payload of each messagepublic abstract Object createValue(gov.aps.jca.dbr.DBR value, gov.aps.jca.dbr.DBR metadata, JCAConnectionPayload connPayload)
value
- the value taken from the monitormetadata
- the value taken as metadataconnPayload
- the connection payloadCopyright © 2010–2015. All rights reserved.