Esri Geoportal Server
1.0

com.esri.gpt.catalog.arcims
Class ImsHttpClient

java.lang.Object
  extended by com.esri.gpt.catalog.arcims.ImsClient
      extended by com.esri.gpt.catalog.arcims.ImsHttpClient

public class ImsHttpClient
extends ImsClient

Provides a basic client for out-bound ArcIMS HTTP communication.


Constructor Summary
ImsHttpClient()
          Default constructor.
 
Method Summary
 Credentials getCredentials()
          Gets the credentials for the user.
 String getResponseContentEncoding()
          Gets the response content encoding.
 long getResponseContentLength()
          Gets the response content length.
 String getResponseContentType()
          Gets the response content type.
 String getUrl()
          Gets the server url.
protected  StringBuffer readCharacters(InputStream strm)
          Fully reads the characters from an InputStream.
protected  void resetResponse()
          Resets the response.
 void sendRequest()
          Sends the HTTP request.
 void setCredentials(Credentials credentials)
          Sets the credentials for the user.
protected  void setResponseContentEncoding(String encoding)
          Sets the response content encoding.
protected  void setResponseContentLength(long length)
          Sets the response content length.
protected  void setResponseContentType(String type)
          Sets the response content type.
 void setUrl(String url)
          Sets the server url.
 
Methods inherited from class com.esri.gpt.catalog.arcims.ImsClient
getAxlRequest, getAxlResponse, getResponseCode, getResponseCodeText, getTimeoutMillisecs, setAxlRequest, setAxlResponse, setResponseCode, setResponseCodeText, setTimeoutMillisecs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImsHttpClient

public ImsHttpClient()
Default constructor.

Method Detail

getCredentials

public Credentials getCredentials()
Gets the credentials for the user.

Returns:
the credentials

setCredentials

public void setCredentials(Credentials credentials)
Sets the credentials for the user.

Parameters:
credentials - the credentials

getResponseContentEncoding

public String getResponseContentEncoding()
Gets the response content encoding.

Returns:
the response content encoding

setResponseContentEncoding

protected void setResponseContentEncoding(String encoding)
Sets the response content encoding.

Parameters:
encoding - the response content encoding

getResponseContentLength

public long getResponseContentLength()
Gets the response content length.

Returns:
the response content length

setResponseContentLength

protected void setResponseContentLength(long length)
Sets the response content length.

Parameters:
length - the response content length

getResponseContentType

public String getResponseContentType()
Gets the response content type.

Returns:
the response content type

setResponseContentType

protected void setResponseContentType(String type)
Sets the response content type.

Parameters:
type - the response content type

getUrl

public String getUrl()
Gets the server url.

Returns:
the server url

setUrl

public void setUrl(String url)
Sets the server url.

Parameters:
url - the server url

readCharacters

protected StringBuffer readCharacters(InputStream strm)
                               throws IOException
Fully reads the characters from an InputStream.

Parameters:
strm - the InputStream
Returns:
the characters read
Throws:
IOException - if an exception occurs

resetResponse

protected void resetResponse()
Resets the response.


sendRequest

public void sendRequest()
                 throws MalformedURLException,
                        IOException
Sends the HTTP request.

Specified by:
sendRequest in class ImsClient
Throws:
MalformedURLException - if the URL was not properly specified
IOException - if a communication exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.