public abstract class BaseClientBuilder<B extends BaseClientBuilder> extends Object
Modifier | Constructor and Description |
---|---|
protected |
BaseClientBuilder() |
Modifier and Type | Method and Description |
---|---|
BtClient |
build() |
protected abstract ProcessingContext |
buildProcessingContext(BtRuntime runtime) |
protected abstract <C extends ProcessingContext> |
collectStageListeners(ListenerSource<C> listenerSource) |
B |
initEagerly()
Initialize the client eagerly.
|
protected B |
runtime(BtRuntime runtime)
Set the runtime that the newly built client will be attached to.
|
protected B runtime(BtRuntime runtime)
runtime
- Bt runtimepublic B initEagerly()
BtClient.startAsync()
method or one of its' overloaded version.
Initialization is implementation-specific and may include fetching torrent metainfo,
creating torrent and data descriptors, reserving storage space,
instantiating client-specific services, triggering DI injection, etc.public BtClient build()
protected abstract ProcessingContext buildProcessingContext(BtRuntime runtime)
protected abstract <C extends ProcessingContext> void collectStageListeners(ListenerSource<C> listenerSource)
Copyright © 2016–2021. All rights reserved.