SimpleXmlRequest

com.j0h1.contour.volley

## Class SimpleXmlRequest<T>

- java.lang.Object
- - com.android.volley.Request<T>
  - - com.j0h1.contour.volley.SimpleXmlRequest<T>

- All Implemented Interfaces:
    java.lang.Comparable<com.android.volley.Request<T>>

      public class SimpleXmlRequest<T>
      extends com.android.volley.Request<T>

  Simple Volley class for doing XML HTTP requests which are parsed into Java objects by the Simple framework.
  Author:
    Johannes Riedmann

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.android.volley.Request

      `com.android.volley.Request.Method, com.android.volley.Request.Priority`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.Class<T>` | `clazz`
    `private java.util.Map<java.lang.String,java.lang.String>` | `headers`
    `private com.android.volley.Response.Listener<T>` | `listener`
    `private static org.simpleframework.xml.Serializer` | `serializer`

  - ### Constructor Summary

    Constructors
    Constructor and Description

    `SimpleXmlRequest(int method, java.lang.String url, java.lang.Class<T> clazz, java.util.Map<java.lang.String,java.lang.String> headers, com.android.volley.Response.Listener<T> listener, com.android.volley.Response.ErrorListener errorListener)`
    Make HTTP request and return a parsed object from XML response.

    `SimpleXmlRequest(int method, java.lang.String url, java.lang.Class<T> clazz, com.android.volley.Response.Listener<T> listener, com.android.volley.Response.ErrorListener errorListener)` Make HTTP request and return a parsed object from Response Invokes the other constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `deliverResponse(T response)`
    `java.util.Map<java.lang.String,java.lang.String>` | `getHeaders()`
    `protected com.android.volley.Response<T>` | `parseNetworkResponse(com.android.volley.NetworkResponse response)`

    - ### Methods inherited from class com.android.volley.Request

      `addMarker, cancel, compareTo, deliverError, getBody, getBodyContentType, getCacheEntry, getCacheKey, getMethod, getParams, getParamsEncoding, getPostBody, getPostBodyContentType, getPostParams, getPostParamsEncoding, getPriority, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, isCanceled, markDelivered, parseNetworkError, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setTag, shouldCache, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### serializer

          private static final org.simpleframework.xml.Serializer serializer

    - #### clazz

          private final java.lang.Class<T> clazz

    - #### headers

          private final java.util.Map<java.lang.String,java.lang.String> headers

    - #### listener

          private final com.android.volley.Response.Listener<T> listener

  - ### Constructor Detail

    - #### SimpleXmlRequest

          public SimpleXmlRequest(int method,
                                  java.lang.String url,
                                  java.lang.Class<T> clazz,
                                  com.android.volley.Response.Listener<T> listener,
                                  com.android.volley.Response.ErrorListener errorListener)

      Make HTTP request and return a parsed object from Response Invokes the other constructor.

    - #### SimpleXmlRequest

          public SimpleXmlRequest(int method,
                                  java.lang.String url,
                                  java.lang.Class<T> clazz,
                                  java.util.Map<java.lang.String,java.lang.String> headers,
                                  com.android.volley.Response.Listener<T> listener,
                                  com.android.volley.Response.ErrorListener errorListener)

      Make HTTP request and return a parsed object from XML response.
      Parameters:
        `url` - URL of the request to make.
        `clazz` - Relevant class object.
        `headers` - Map of request headers.
        `listener` - Listener for successful response.
        `errorListener` - Request returns with an Volley error.

  - ### Method Detail

    - #### getHeaders

          public java.util.Map<java.lang.String,java.lang.String> getHeaders()
                                                                      throws com.android.volley.AuthFailureError

      Overrides:
        `getHeaders` in class `com.android.volley.Request<T>`
      Throws:
        `com.android.volley.AuthFailureError`

    - #### deliverResponse

          protected void deliverResponse(T response)

      Specified by:
        `deliverResponse` in class `com.android.volley.Request<T>`

    - #### parseNetworkResponse

          protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse response)

      Specified by:
        `parseNetworkResponse` in class `com.android.volley.Request<T>`