Package org.epics.pvaccess.client.rpc
Interface RPCClient
-
- All Known Implementing Classes:
RPCClientImpl
public interface RPCClient
Interface that is called by a service client.- Author:
- mrk
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Called by client when the service is no longer required.org.epics.pvdata.pv.PVStructure
request(org.epics.pvdata.pv.PVStructure pvArgument, double timeout)
Send a request and wait for the response or until timeout occurs.void
sendRequest(org.epics.pvdata.pv.PVStructure pvArgument)
Send a request.boolean
waitConnect(double timeout)
Called by client to wait for connection to the service.boolean
waitResponse(double timeout)
Wait for the request to finish.
-
-
-
Method Detail
-
destroy
void destroy()
Called by client when the service is no longer required.
-
waitConnect
boolean waitConnect(double timeout)
Called by client to wait for connection to the service. This call blocks until a connection is made or until a timeout occurs. A connection means that a channel connects and a ChannelRPC has been created.- Parameters:
timeout
- The time in seconds to wait for the connection.- Returns:
- true on connect, false on timeout.
-
request
org.epics.pvdata.pv.PVStructure request(org.epics.pvdata.pv.PVStructure pvArgument, double timeout) throws RPCRequestException
Send a request and wait for the response or until timeout occurs. This method will also wait for client to connect, if necessary.- Parameters:
pvArgument
- The argument for the rpc.timeout
- The time in seconds to wait for the response.- Returns:
- request response.
- Throws:
RPCRequestException
- thrown in case of an server-side error, check RPCRequestException.getStatus() for details.
-
sendRequest
void sendRequest(org.epics.pvdata.pv.PVStructure pvArgument)
Send a request. The client must be connected at the time this method is called.- Parameters:
pvArgument
- The argument for the rpc.
-
waitResponse
boolean waitResponse(double timeout)
Wait for the request to finish.- Parameters:
timeout
- The time in seconds to wait for the response.- Returns:
- true on connect, false on timeout.
-
-