Class BLNexusClient
java.lang.Object
com.io7m.brooklime.vanilla.internal.BLNexusClient
- All Implemented Interfaces:
BLNexusClientType,Closeable,AutoCloseable
A Nexus client.
-
Constructor Summary
ConstructorsConstructorDescriptionBLNexusClient(ScheduledExecutorService inExecutor, HttpClient inClient, BLNexusRequests inRequests, Clock inClock) A Nexus client. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Create a staging repository upload request.List the available staging repositories.voidClose one or more staging repositories.Create a staging repository.voidDrop one or more staging repositories.Retrieve an existing staging repository.voidRelease one or more staging repositories.voidupload(BLStagingRepositoryUpload upload, BLProgressReceiverType receiver) Execute an upload request.
-
Constructor Details
-
BLNexusClient
public BLNexusClient(ScheduledExecutorService inExecutor, HttpClient inClient, BLNexusRequests inRequests, Clock inClock) A Nexus client.- Parameters:
inExecutor- A statistics executorinClient- An HTTP clientinRequests- A request providerinClock- A clock used to track time
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
upload
public void upload(BLStagingRepositoryUpload upload, BLProgressReceiverType receiver) throws BLException Description 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 BLException Description 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
Description 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
Description 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
-