Class CoffeePickRuntimeRepositoryContext
- java.lang.Object
-
- com.io7m.coffeepick.client.vanilla.CoffeePickRuntimeRepositoryContext
-
- All Implemented Interfaces:
RuntimeRepositoryContextType
public final class CoffeePickRuntimeRepositoryContext extends java.lang.Object implements RuntimeRepositoryContextType
The default runtime repository context implementation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.PathcacheDirectory()java.net.http.HttpClienthttpClient()static RuntimeRepositoryContextTypeopen(java.nio.file.Path base_directory, java.net.http.HttpClient http)Open a new context.
-
-
-
Method Detail
-
open
public static RuntimeRepositoryContextType open(java.nio.file.Path base_directory, java.net.http.HttpClient http) throws java.io.IOException
Open a new context.- Parameters:
base_directory- The base directory against which repositories will resolve pathshttp- The HTTP client used for requests- Returns:
- A new context
- Throws:
java.io.IOException- On I/O errors
-
cacheDirectory
public java.nio.file.Path cacheDirectory()
- Specified by:
cacheDirectoryin interfaceRuntimeRepositoryContextType- Returns:
- The base cache directory
-
httpClient
public java.net.http.HttpClient httpClient()
- Specified by:
httpClientin interfaceRuntimeRepositoryContextType- Returns:
- An HTTP client to be used for requests
-
-