Class BLNexusClient
java.lang.Object
com.io7m.brooklime.vanilla.internal.BLNexusClient
- All Implemented Interfaces:
BLNexusClientType,java.io.Closeable,java.lang.AutoCloseable
public final class BLNexusClient extends java.lang.Object implements BLNexusClientType
-
Constructor Summary
Constructors Constructor Description BLNexusClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient inClient, BLNexusRequests inRequests, java.time.Clock inClock) -
Method Summary
Modifier and Type Method Description voidclose()BLStagingRepositoryUploadcreateUploadRequest(BLStagingRepositoryUploadRequestParameters parameters)Create a staging repository upload request.java.util.List<BLStagingProfileRepository>stagingRepositories()List the available staging repositories.voidstagingRepositoryClose(BLStagingRepositoryClose close)Close one or more staging repositories.java.lang.StringstagingRepositoryCreate(BLStagingRepositoryCreate create)Create a staging repository.voidstagingRepositoryDrop(BLStagingRepositoryDrop drop)Drop one or more staging repositories.java.util.Optional<BLStagingProfileRepository>stagingRepositoryGet(java.lang.String id)Retrieve an existing staging repository.voidstagingRepositoryRelease(BLStagingRepositoryRelease release)Release one or more staging repositories.voidupload(BLStagingRepositoryUpload upload, BLProgressReceiverType receiver)Execute an upload request.
-
Constructor Details
-
BLNexusClient
public BLNexusClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient inClient, BLNexusRequests inRequests, java.time.Clock inClock)
-
-
Method Details
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
upload
public void upload(BLStagingRepositoryUpload upload, BLProgressReceiverType receiver) throws BLExceptionDescription copied from interface:BLNexusClientTypeExecute an upload request. Progress updates will be delivered to the given receiver.- Specified by:
uploadin interfaceBLNexusClientType- Parameters:
upload- The set of files to be uploadedreceiver- The progress receiver- Throws:
BLException- On errors
-
createUploadRequest
public BLStagingRepositoryUpload createUploadRequest(BLStagingRepositoryUploadRequestParameters parameters) throws BLExceptionDescription copied from interface:BLNexusClientTypeCreate a staging repository upload request.- Specified by:
createUploadRequestin interfaceBLNexusClientType- Parameters:
parameters- The upload request parameters- Returns:
- A new request
- Throws:
BLException- On errors
-
stagingRepositories
Description copied from interface:BLNexusClientTypeList the available staging repositories.- Specified by:
stagingRepositoriesin interfaceBLNexusClientType- Returns:
- The list of repositories
- Throws:
BLException- On errors
-
stagingRepositoryGet
public java.util.Optional<BLStagingProfileRepository> stagingRepositoryGet(java.lang.String id) throws BLExceptionDescription copied from interface:BLNexusClientTypeRetrieve an existing staging repository.- Specified by:
stagingRepositoryGetin interfaceBLNexusClientType- Parameters:
id- The ID of the repository- Returns:
- The repository, or nothing if the repository does not exist
- Throws:
BLException- On errors
-
stagingRepositoryCreate
public java.lang.String stagingRepositoryCreate(BLStagingRepositoryCreate create) throws BLExceptionDescription copied from interface:BLNexusClientTypeCreate a staging repository.- Specified by:
stagingRepositoryCreatein interfaceBLNexusClientType- Parameters:
create- The creation parameters- Returns:
- The ID of the created repository
- Throws:
BLException- On errors
-
stagingRepositoryDrop
Description copied from interface:BLNexusClientTypeDrop one or more staging repositories.- Specified by:
stagingRepositoryDropin interfaceBLNexusClientType- Parameters:
drop- The repository parameters- Throws:
BLException- On errors
-
stagingRepositoryClose
Description copied from interface:BLNexusClientTypeClose one or more staging repositories.- Specified by:
stagingRepositoryClosein interfaceBLNexusClientType- Parameters:
close- The repository parameters- Throws:
BLException- On errors
-
stagingRepositoryRelease
Description copied from interface:BLNexusClientTypeRelease one or more staging repositories.- Specified by:
stagingRepositoryReleasein interfaceBLNexusClientType- Parameters:
release- The repository parameters- Throws:
BLException- On errors
-