org.jfrog.build.client
Class ArtifactoryHttpClient

java.lang.Object
  extended by org.jfrog.build.client.ArtifactoryHttpClient

public class ArtifactoryHttpClient
extends java.lang.Object


Field Summary
static ArtifactoryVersion MINIMAL_ARTIFACTORY_VERSION
           
static ArtifactoryVersion NON_NUMERIC_BUILD_NUMBERS_TOLERANT_ARTIFACTORY_VERSION
           
static ArtifactoryVersion UNKNOWN_PROPERTIES_TOLERANT_ARTIFACTORY_VERSION
           
static java.lang.String VERSION_INFO_URL
           
 
Constructor Summary
ArtifactoryHttpClient(java.lang.String artifactoryUrl, java.lang.String username, java.lang.String password, org.jfrog.build.api.util.Log log)
           
 
Method Summary
 org.codehaus.jackson.JsonFactory createJsonFactory()
           
 org.codehaus.jackson.JsonParser createJsonParser(java.io.InputStream in)
           
 org.codehaus.jackson.JsonParser createJsonParser(java.lang.String content)
           
static java.lang.String encodeUrl(java.lang.String unescaped)
           
 ArtifactoryUploadResponse execute(org.apache.http.client.methods.HttpPut httpPut)
           
 PreemptiveHttpClient getHttpClient()
           
 ArtifactoryVersion getVersion()
           
 void setConnectionTimeout(int connectionTimeout)
          Network timeout in seconds to use both for connection establishment and for unanswered requests.
 void setProxyConfiguration(java.lang.String host, int port)
          Sets the proxy host and port.
 void setProxyConfiguration(java.lang.String host, int port, java.lang.String username, java.lang.String password)
          Sets the proxy details.
 void shutdown()
          Release all connection and cleanup resources.
 ArtifactoryUploadResponse upload(org.apache.http.client.methods.HttpPut httpPut, org.apache.http.HttpEntity fileEntity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_PROPERTIES_TOLERANT_ARTIFACTORY_VERSION

public static final ArtifactoryVersion UNKNOWN_PROPERTIES_TOLERANT_ARTIFACTORY_VERSION

NON_NUMERIC_BUILD_NUMBERS_TOLERANT_ARTIFACTORY_VERSION

public static final ArtifactoryVersion NON_NUMERIC_BUILD_NUMBERS_TOLERANT_ARTIFACTORY_VERSION

MINIMAL_ARTIFACTORY_VERSION

public static final ArtifactoryVersion MINIMAL_ARTIFACTORY_VERSION

VERSION_INFO_URL

public static final java.lang.String VERSION_INFO_URL
See Also:
Constant Field Values
Constructor Detail

ArtifactoryHttpClient

public ArtifactoryHttpClient(java.lang.String artifactoryUrl,
                             java.lang.String username,
                             java.lang.String password,
                             org.jfrog.build.api.util.Log log)
Method Detail

encodeUrl

public static java.lang.String encodeUrl(java.lang.String unescaped)

setProxyConfiguration

public void setProxyConfiguration(java.lang.String host,
                                  int port)
Sets the proxy host and port.

Parameters:
host - Proxy host
port - Proxy port

setProxyConfiguration

public void setProxyConfiguration(java.lang.String host,
                                  int port,
                                  java.lang.String username,
                                  java.lang.String password)
Sets the proxy details.

Parameters:
host - Proxy host
port - Proxy port
username - Username to authenticate with the proxy
password - Password to authenticate with the proxy

setConnectionTimeout

public void setConnectionTimeout(int connectionTimeout)
Network timeout in seconds to use both for connection establishment and for unanswered requests.

Parameters:
connectionTimeout - Timeout in seconds.

shutdown

public void shutdown()
Release all connection and cleanup resources.


getHttpClient

public PreemptiveHttpClient getHttpClient()

getVersion

public ArtifactoryVersion getVersion()
                              throws java.io.IOException
Throws:
java.io.IOException

createJsonParser

public org.codehaus.jackson.JsonParser createJsonParser(java.io.InputStream in)
                                                 throws java.io.IOException
Throws:
java.io.IOException

createJsonParser

public org.codehaus.jackson.JsonParser createJsonParser(java.lang.String content)
                                                 throws java.io.IOException
Throws:
java.io.IOException

createJsonFactory

public org.codehaus.jackson.JsonFactory createJsonFactory()

upload

public ArtifactoryUploadResponse upload(org.apache.http.client.methods.HttpPut httpPut,
                                        org.apache.http.HttpEntity fileEntity)
                                 throws java.io.IOException
Throws:
java.io.IOException

execute

public ArtifactoryUploadResponse execute(org.apache.http.client.methods.HttpPut httpPut)
                                  throws java.io.IOException
Throws:
java.io.IOException