public class AylaLanRequest extends AylaAPIRequest<AylaLanRequest.LanResponse>
All AylaLanRequest objects return a LanResponse, which contains the list of completed commands that either have a response or an error returned. Each command holds its own response or error.
When this request is processed in a queue that was initialized with an AylaLocalNetwork
object, it will process each LAN command in order and gather the results. Even if each LAN
command fails, the AylaLanRequest can still succeed, though each LanCommand contained within
the request object will contain an error.
The AylaLanRequest itself can fail if the device is not found or the LAN session is not running at the time the request is sent out.
Generally, this request type is used internally and the results collated into a different type
of response for an API. See AylaDevice.fetchPropertiesLAN(String[], Response.Listener, ErrorListener)
for an example of this.
Modifier and Type | Class and Description |
---|---|
static class |
AylaLanRequest.LanResponse |
AylaAPIRequest.EmptyResponse
__customUserAgent, _additionalHeaders, _chainedRequest, _clazz, _errorListener, _logResponse, _networkResponse, _networkResponseTimestamp, _responseHeaders, _sessionManagerRef, _successListener
Constructor and Description |
---|
AylaLanRequest(AylaDevice device,
LanCommand lanCommand,
AylaSessionManager sessionManager,
com.android.volley.Response.Listener<AylaLanRequest.LanResponse> successListener,
ErrorListener errorListener)
Constructor taking in a single LanCommand
|
AylaLanRequest(AylaDevice device,
java.util.List<LanCommand> lanCommands,
AylaSessionManager sessionManager,
com.android.volley.Response.Listener<AylaLanRequest.LanResponse> successListener,
ErrorListener errorListener)
Constructor
|
Modifier and Type | Method and Description |
---|---|
AylaDevice |
getDevice() |
java.util.List<LanCommand> |
getLanCommands() |
protected com.android.volley.Response<AylaLanRequest.LanResponse> |
parseNetworkResponse(com.android.volley.NetworkResponse response) |
cancel, deliverResponse, dummyRequest, getGson, getHeaders, getLogTag, getNetworkResponse, getNetworkResponseTimestamp, getNetworkTimeMs, getRequestErrorListener, getSuccessListener, logResponse, parseNetworkError, setChainedRequest, setUserAgent
addMarker, compareTo, deliverError, getBody, getBodyContentType, getCacheEntry, getCacheKey, getErrorListener, getMethod, getParams, getParamsEncoding, getPostBody, getPostBodyContentType, getPostParams, getPostParamsEncoding, getPriority, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, isCanceled, markDelivered, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setShouldRetryServerErrors, setTag, shouldCache, shouldRetryServerErrors, toString
public AylaLanRequest(AylaDevice device, java.util.List<LanCommand> lanCommands, AylaSessionManager sessionManager, com.android.volley.Response.Listener<AylaLanRequest.LanResponse> successListener, ErrorListener errorListener)
device
- AylaDevice this request is meant forlanCommands
- List of commands that compose this requestsessionManager
- The AylaSessionManager
that owns our devicesuccessListener
- Listener to receive the results of a successful operationerrorListener
- Listener to receive errors in case of failurepublic AylaLanRequest(AylaDevice device, LanCommand lanCommand, AylaSessionManager sessionManager, com.android.volley.Response.Listener<AylaLanRequest.LanResponse> successListener, ErrorListener errorListener)
device
- AylaDevice this request is meant forlanCommand
- Single command that composes this requestsessionManager
- The AylaSessionManager
that owns our devicesuccessListener
- Listener to receive the results of a successful operationerrorListener
- Listener to receive errors in case of failurepublic java.util.List<LanCommand> getLanCommands()
public AylaDevice getDevice()
protected com.android.volley.Response<AylaLanRequest.LanResponse> parseNetworkResponse(com.android.volley.NetworkResponse response)
parseNetworkResponse
in class AylaAPIRequest<AylaLanRequest.LanResponse>