public class BtRuntime extends Object
Modifier and Type | Method and Description |
---|---|
void |
attachClient(BtClient client)
Attach the provided client to this runtime.
|
static BtRuntimeBuilder |
builder() |
static BtRuntimeBuilder |
builder(Config config) |
static BtRuntime |
defaultRuntime()
Creates a vanilla runtime with default configuration
|
void |
detachClient(BtClient client)
Detach the client from this runtime.
|
Collection<BtClient> |
getClients()
Get all clients, that are attached to this runtime.
|
Config |
getConfig() |
EventSource |
getEventSource() |
com.google.inject.Injector |
getInjector() |
boolean |
isRunning() |
<T> T |
service(Class<T> serviceType)
Convenience method to get an instance of a shared DI service.
|
void |
shutdown()
Manually initiate the runtime shutdown procedure, which includes:
- stopping all attached clients
- stopping all workers and executors, that were created inside this runtime
and registered via
IRuntimeLifecycleBinder |
void |
startup()
Manually start the runtime (possibly with no clients attached).
|
public static BtRuntimeBuilder builder()
public static BtRuntimeBuilder builder(Config config)
config
- Custom configurationpublic static BtRuntime defaultRuntime()
public com.google.inject.Injector getInjector()
public Config getConfig()
public <T> T service(Class<T> serviceType)
public boolean isRunning()
public void startup()
public void attachClient(BtClient client)
public void detachClient(BtClient client)
public Collection<BtClient> getClients()
public EventSource getEventSource()
public void shutdown()
IRuntimeLifecycleBinder
Copyright © 2016–2021. All rights reserved.