com.eurotech.framework.cloud
Interface CloudCallService


public interface CloudCallService

The CloudCallService provides helper methods to make a request/response conversation with the remote server. The call methods deal with the logic required to build request messages and track the corresponding responses. All call methods are synchronous; after a request is issued, the implementation will wait for the response to arrive or a timeout occurs. The timeout interval used by the service is configurable as a property of the DataTransportService.


Method Summary
 EsfResponsePayload call(String appId, String appTopic, EsfPayload appPayload, int timeout)
          Sends a local (to this device) request to a Cloudlet application with the given application ID waiting for the response.
 EsfResponsePayload call(String deviceId, String appId, String appTopic, EsfPayload appPayload, int timeout)
          Sends a request to a remote server or device identified by the specified deviceId and targeting the given application ID waiting for the response.
 boolean isConnected()
          Returns true if the underlying DataService is currently connected to the remote server.
 

Method Detail

call

EsfResponsePayload call(String appId,
                        String appTopic,
                        EsfPayload appPayload,
                        int timeout)
                        throws EsfConnectException,
                               EsfTimeoutException,
                               EsfStoreException,
                               EsfException
Sends a local (to this device) request to a Cloudlet application with the given application ID waiting for the response.

Parameters:
appId -
appTopic -
appPayload - the application specific payload of an EsfRequestPayload.
timeout -
Returns:
Throws:
EsfConnectException
EsfTimeoutException
EsfStoreException
EsfException

call

EsfResponsePayload call(String deviceId,
                        String appId,
                        String appTopic,
                        EsfPayload appPayload,
                        int timeout)
                        throws EsfConnectException,
                               EsfTimeoutException,
                               EsfStoreException,
                               EsfException
Sends a request to a remote server or device identified by the specified deviceId and targeting the given application ID waiting for the response.

Parameters:
deviceId -
appId -
appTopic -
appPayload -
timeout -
Returns:
Throws:
EsfConnectException
EsfTimeoutException
EsfStoreException
EsfException

isConnected

boolean isConnected()
Returns true if the underlying DataService is currently connected to the remote server.

Returns:


Copyright © 2013. All Rights Reserved.