public class

HttpRequestHandler

extends Object
java.lang.Object
   ↳ com.esri.core.io.HttpRequestHandler

Class Overview

A singleton class that gives access to some features of HTTP requests.

Summary

Public Methods
HttpRequestListener getHttpRequestListener()
Returns the HttpRequestListener.
static HttpRequestHandler getInstance()
Returns the instance of HttpRequestHandler.
void setAdditionalUserAgentInfo(String info)
Sets additional information to be put in the User-Agent header field in all HTTP requests.
void setHttpRequestListener(HttpRequestListener httpRequestListener)
Sets the HttpRequestListener.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public HttpRequestListener getHttpRequestListener ()

Returns the HttpRequestListener.

Returns
HttpRequestListener the HttpRequestListener object, or null if none has been set.

public static HttpRequestHandler getInstance ()

Returns the instance of HttpRequestHandler.

Returns
HttpRequestHandler HttpRequestHandler object.

public void setAdditionalUserAgentInfo (String info)

Sets additional information to be put in the User-Agent header field in all HTTP requests. This will be added at the start of the User-Agent field and is intended to identify the name and version of the application software.

Parameters
info String: String to be added at the start of the User-Agent header field

public void setHttpRequestListener (HttpRequestListener httpRequestListener)

Sets the HttpRequestListener. With an HttpRequestListener you can:

  • intercept the HTTP request and examine its headers (for example the user-agent and application name),
  • inject cookies into the request.
Interception will potentially deteriorate the performance of communication from client to server.

Parameters
httpRequestListener HttpRequestListener: a HttpRequestListener object.