Class BintrayImpl
- java.lang.Object
-
- com.jfrog.bintray.client.impl.handle.BintrayImpl
-
- All Implemented Interfaces:
com.jfrog.bintray.client.api.handle.Bintray
,Closeable
,AutoCloseable
public class BintrayImpl extends Object implements com.jfrog.bintray.client.api.handle.Bintray
-
-
Constructor Summary
Constructors Constructor Description BintrayImpl(org.apache.http.impl.client.CloseableHttpClient client, String baseUrl, int threadPoolSize, int signRequestTimeoutPerFile)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addContentTypeBinaryHeader(Map<String,String> headers)
static void
addContentTypeJsonHeader(Map<String,String> headers)
void
close()
org.apache.http.HttpResponse
delete(String uri, Map<String,String> headers)
org.apache.http.HttpResponse
get(String uri, Map<String,String> headers)
org.apache.http.HttpResponse
head(String uri, Map<String,String> headers)
org.apache.http.HttpResponse
patch(String uri, Map<String,String> headers, InputStream elementInputStream)
com.jfrog.bintray.client.api.handle.PackageHandle
pkg(String packagePath)
org.apache.http.HttpResponse
post(String uri, Map<String,String> headers)
org.apache.http.HttpResponse
post(String uri, Map<String,String> headers, InputStream elementInputStream)
org.apache.http.HttpResponse
put(String uri, Map<String,String> headers, InputStream elementInputStream)
org.apache.http.HttpResponse
put(Map<String,InputStream> uriAndStreamMap, Map<String,String> headers)
org.apache.http.HttpResponse
putBinary(String uri, Map<String,String> headers, InputStream elementInputStream)
org.apache.http.HttpResponse
putBinary(Map<String,InputStream> uriAndStreamMap, Map<String,String> headers)
com.jfrog.bintray.client.api.handle.RepositoryHandle
repository(String repositoryPath)
org.apache.http.HttpResponse
sign(String uri, Map<String,String> headers, int fileCount)
Executes a sign request using the ExecutorService and uses the file count to set a timeout to avoid timing out on long requestscom.jfrog.bintray.client.api.handle.SubjectHandle
subject(String subject)
com.jfrog.bintray.client.api.handle.VersionHandle
version(String versionPath)
-
-
-
Constructor Detail
-
BintrayImpl
public BintrayImpl(org.apache.http.impl.client.CloseableHttpClient client, String baseUrl, int threadPoolSize, int signRequestTimeoutPerFile)
-
-
Method Detail
-
addContentTypeBinaryHeader
public static void addContentTypeBinaryHeader(Map<String,String> headers)
-
subject
public com.jfrog.bintray.client.api.handle.SubjectHandle subject(String subject)
- Specified by:
subject
in interfacecom.jfrog.bintray.client.api.handle.Bintray
-
repository
public com.jfrog.bintray.client.api.handle.RepositoryHandle repository(String repositoryPath)
- Specified by:
repository
in interfacecom.jfrog.bintray.client.api.handle.Bintray
-
pkg
public com.jfrog.bintray.client.api.handle.PackageHandle pkg(String packagePath)
- Specified by:
pkg
in interfacecom.jfrog.bintray.client.api.handle.Bintray
-
version
public com.jfrog.bintray.client.api.handle.VersionHandle version(String versionPath)
- Specified by:
version
in interfacecom.jfrog.bintray.client.api.handle.Bintray
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfacecom.jfrog.bintray.client.api.handle.Bintray
- Specified by:
close
in interfaceCloseable
-
get
public org.apache.http.HttpResponse get(String uri, Map<String,String> headers) throws com.jfrog.bintray.client.api.BintrayCallException
- Specified by:
get
in interfacecom.jfrog.bintray.client.api.handle.Bintray
- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
head
public org.apache.http.HttpResponse head(String uri, Map<String,String> headers) throws com.jfrog.bintray.client.api.BintrayCallException
- Specified by:
head
in interfacecom.jfrog.bintray.client.api.handle.Bintray
- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
sign
public org.apache.http.HttpResponse sign(String uri, Map<String,String> headers, int fileCount) throws com.jfrog.bintray.client.api.BintrayCallException
Executes a sign request using the ExecutorService and uses the file count to set a timeout to avoid timing out on long requests- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
post
public org.apache.http.HttpResponse post(String uri, Map<String,String> headers) throws com.jfrog.bintray.client.api.BintrayCallException
- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
post
public org.apache.http.HttpResponse post(String uri, Map<String,String> headers, InputStream elementInputStream) throws com.jfrog.bintray.client.api.BintrayCallException
- Specified by:
post
in interfacecom.jfrog.bintray.client.api.handle.Bintray
- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
patch
public org.apache.http.HttpResponse patch(String uri, Map<String,String> headers, InputStream elementInputStream) throws com.jfrog.bintray.client.api.BintrayCallException
- Specified by:
patch
in interfacecom.jfrog.bintray.client.api.handle.Bintray
- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
delete
public org.apache.http.HttpResponse delete(String uri, Map<String,String> headers) throws com.jfrog.bintray.client.api.BintrayCallException
- Specified by:
delete
in interfacecom.jfrog.bintray.client.api.handle.Bintray
- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
putBinary
public org.apache.http.HttpResponse putBinary(String uri, Map<String,String> headers, InputStream elementInputStream) throws com.jfrog.bintray.client.api.BintrayCallException
- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
putBinary
public org.apache.http.HttpResponse putBinary(Map<String,InputStream> uriAndStreamMap, Map<String,String> headers) throws com.jfrog.bintray.client.api.MultipleBintrayCallException
- Throws:
com.jfrog.bintray.client.api.MultipleBintrayCallException
-
put
public org.apache.http.HttpResponse put(String uri, Map<String,String> headers, InputStream elementInputStream) throws com.jfrog.bintray.client.api.BintrayCallException
- Specified by:
put
in interfacecom.jfrog.bintray.client.api.handle.Bintray
- Throws:
com.jfrog.bintray.client.api.BintrayCallException
-
put
public org.apache.http.HttpResponse put(Map<String,InputStream> uriAndStreamMap, Map<String,String> headers) throws com.jfrog.bintray.client.api.MultipleBintrayCallException
- Specified by:
put
in interfacecom.jfrog.bintray.client.api.handle.Bintray
- Throws:
com.jfrog.bintray.client.api.MultipleBintrayCallException
-
-