Esri Geoportal Server
1.0

com.esri.gpt.catalog.harvest.clients
Class HRHttpClient

java.lang.Object
  extended by com.esri.gpt.catalog.harvest.clients.HRAbstractClient
      extended by com.esri.gpt.catalog.harvest.clients.HRHttpClient
All Implemented Interfaces:
HRClient
Direct Known Subclasses:
HRARCIMSClient, HRCSWClient, HROAIClient, HRProtectedHttpClient

public abstract class HRHttpClient
extends HRAbstractClient

Harvest repository HTTP client. Provides implementation usefull when connecting to the remote repositories utilizing HTTP protocol.


Field Summary
protected static String FTP_URL_PFX
          ftp protocol prefix
protected static String HTTP_URL_PFX
          http protocol prefix
protected static String HTTPS_URL_PFX
          https protocol prefix
 
Constructor Summary
HRHttpClient()
           
 
Method Summary
protected  boolean isFtp()
          Checks if protocol is a FTP protocol.
protected  boolean isHttp()
          Checks if protocol is a HTTP protocol.
protected  boolean isHttps()
          Checks if protocol is a HTTPS protocol.
protected  InputStream openConnection(String connectionString)
          Creates HTTP connection.
protected  InputStream openConnection(String connectionString, String initString)
          Creates http connection.
protected  void validateProtocol()
          Validates protocol definition.
 
Methods inherited from class com.esri.gpt.catalog.harvest.clients.HRAbstractClient
getHostUrl, getTimeout, isPingSupported, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.gpt.catalog.harvest.clients.HRClient
ping
 

Field Detail

HTTP_URL_PFX

protected static final String HTTP_URL_PFX
http protocol prefix

See Also:
Constant Field Values

HTTPS_URL_PFX

protected static final String HTTPS_URL_PFX
https protocol prefix

See Also:
Constant Field Values

FTP_URL_PFX

protected static final String FTP_URL_PFX
ftp protocol prefix

See Also:
Constant Field Values
Constructor Detail

HRHttpClient

public HRHttpClient()
Method Detail

isHttp

protected boolean isHttp()
Checks if protocol is a HTTP protocol.

Returns:
true if protocol is a HTTP protocol

isHttps

protected boolean isHttps()
Checks if protocol is a HTTPS protocol.

Returns:
true if protocol is a HTTPS protocol

isFtp

protected boolean isFtp()
Checks if protocol is a FTP protocol.

Returns:
true if protocol is a FTP protocol

validateProtocol

protected void validateProtocol()
                         throws HRInvalidProtocolException
Validates protocol definition.

Overrides:
validateProtocol in class HRAbstractClient
Throws:
HRInvalidProtocolException - if invalid protocol definition

openConnection

protected InputStream openConnection(String connectionString)
                              throws HRConnectionException
Creates HTTP connection.

Parameters:
connectionString - connection string
Returns:
input stream to read response
Throws:
HRConnectionException - if unable to open connection

openConnection

protected InputStream openConnection(String connectionString,
                                     String initString)
                              throws HRConnectionException
Creates http connection.

Parameters:
connectionString - connection string
initString - text of request to be sent uppon connection
Returns:
input stream to read response
Throws:
HRConnectionException - if unable to open connection

Esri Geoportal Server
1.0

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