Class RPCClientImpl

    • Constructor Detail

      • RPCClientImpl

        public RPCClientImpl​(String serviceName)
      • RPCClientImpl

        public RPCClientImpl​(String serviceName,
                             org.epics.pvdata.pv.PVStructure pvRequest)
      • RPCClientImpl

        public RPCClientImpl​(String serviceName,
                             org.epics.pvdata.pv.PVStructure pvRequest,
                             RPCClientRequester requester)
    • Method Detail

      • destroy

        public void destroy()
        Description copied from interface: RPCClient
        Called by client when the service is no longer required.
        Specified by:
        destroy in interface RPCClient
      • waitConnect

        public boolean waitConnect​(double timeout)
        Description copied from interface: RPCClient
        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.
        Specified by:
        waitConnect in interface RPCClient
        Parameters:
        timeout - The time in seconds to wait for the connection.
        Returns:
        true on connect, false on timeout.
      • request

        public org.epics.pvdata.pv.PVStructure request​(org.epics.pvdata.pv.PVStructure pvArgument,
                                                       double timeout)
                                                throws RPCRequestException
        Description copied from interface: RPCClient
        Send a request and wait for the response or until timeout occurs. This method will also wait for client to connect, if necessary.
        Specified by:
        request in interface RPCClient
        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

        public void sendRequest​(org.epics.pvdata.pv.PVStructure pvArgument)
        Description copied from interface: RPCClient
        Send a request. The client must be connected at the time this method is called.
        Specified by:
        sendRequest in interface RPCClient
        Parameters:
        pvArgument - The argument for the rpc.
      • waitResponse

        public boolean waitResponse​(double timeout)
        Description copied from interface: RPCClient
        Wait for the request to finish.
        Specified by:
        waitResponse in interface RPCClient
        Parameters:
        timeout - The time in seconds to wait for the response.
        Returns:
        true on connect, false on timeout.
      • getRequesterName

        public String getRequesterName()
        Specified by:
        getRequesterName in interface org.epics.pvdata.pv.Requester
      • message

        public void message​(String message,
                            org.epics.pvdata.pv.MessageType messageType)
        Specified by:
        message in interface org.epics.pvdata.pv.Requester
      • channelCreated

        public void channelCreated​(org.epics.pvdata.pv.Status status,
                                   Channel channel)
        Description copied from interface: ChannelRequester
        A channel has been created. This may be called multiple times if there are multiple providers.
        Specified by:
        channelCreated in interface ChannelRequester
        Parameters:
        status - Completion status.
        channel - The channel or null if the request failed.
      • channelRPCConnect

        public void channelRPCConnect​(org.epics.pvdata.pv.Status status,
                                      ChannelRPC channelRPC)
        Description copied from interface: ChannelRPCRequester
        The client and server have both completed the createChannelGet request.
        Specified by:
        channelRPCConnect in interface ChannelRPCRequester
        Parameters:
        status - Completion status.
        channelRPC - The channelRPC interface or null if the request failed.
      • requestDone

        public void requestDone​(org.epics.pvdata.pv.Status status,
                                ChannelRPC channelRPC,
                                org.epics.pvdata.pv.PVStructure result)
        Description copied from interface: ChannelRPCRequester
        The request is done. This is always called with no locks held.
        Specified by:
        requestDone in interface ChannelRPCRequester
        Parameters:
        status - Completion status.
        channelRPC - The channelRPC interface.
        result - The response data for the RPC request or null if the request failed.