Package org.scictrl.csshell.epics
Class EPICSConnector.OneShotGet
java.lang.Object
org.scictrl.csshell.epics.EPICSConnector.OneShotGet
- All Implemented Interfaces:
gov.aps.jca.event.ConnectionListener
,gov.aps.jca.event.GetListener
,EventListener
- Enclosing class:
EPICSConnector
public static class EPICSConnector.OneShotGet
extends Object
implements gov.aps.jca.event.ConnectionListener, gov.aps.jca.event.GetListener
Makes one time asynchronous requests.
-
Constructor Summary
ConstructorDescriptionOneShotGet
(gov.aps.jca.Channel channel, gov.aps.jca.dbr.DBRType type) ConstructorOneShotGet
(String name, gov.aps.jca.Context ctx, gov.aps.jca.dbr.DBRType type) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
connectionChanged
(gov.aps.jca.event.ConnectionEvent ev) void
getCompleted
(gov.aps.jca.event.GetEvent ev) gov.aps.jca.dbr.DBR
getFutureDBR
(long timeout) RequestsDBR
data and waits till result or timeout.getFutureMetaData
(long timeout) Requests metadata and waits for result or timeout.Poop
<?, gov.aps.jca.dbr.DBR> getFuturePoop
(long timeout) Blacks call and waits for result in future.void
requestMetaData
(PropertyChangeListener callback) Requests metadata in asynchronous way and delivers result to callback.
-
Constructor Details
-
OneShotGet
public OneShotGet(String name, gov.aps.jca.Context ctx, gov.aps.jca.dbr.DBRType type) throws IllegalStateException, gov.aps.jca.CAException Constructor.- Parameters:
name
- the name of remote channelctx
- the context for the connectiontype
- the data type of the connection- Throws:
IllegalStateException
- if connection failsgov.aps.jca.CAException
- if connection fails
-
OneShotGet
public OneShotGet(gov.aps.jca.Channel channel, gov.aps.jca.dbr.DBRType type) Constructor- Parameters:
channel
- the channel to make requests totype
- the default data type
-
-
Method Details
-
connectionChanged
public void connectionChanged(gov.aps.jca.event.ConnectionEvent ev) - Specified by:
connectionChanged
in interfacegov.aps.jca.event.ConnectionListener
-
getCompleted
public void getCompleted(gov.aps.jca.event.GetEvent ev) - Specified by:
getCompleted
in interfacegov.aps.jca.event.GetListener
-
getFutureDBR
RequestsDBR
data and waits till result or timeout.- Parameters:
timeout
- the timeout to wait for data- Returns:
- returns
DBR
for connection - Throws:
Exception
- if request fails
-
getFutureMetaData
Requests metadata and waits for result or timeout. -
requestMetaData
Requests metadata in asynchronous way and delivers result to callback.- Parameters:
callback
- the callback for the request- Throws:
Exception
- if request fails
-
getFuturePoop
Blacks call and waits for result in future.- Parameters:
timeout
- timeout for wiating- Returns:
- result
- Throws:
Exception
- if error
-