public abstract class SlContext
extends java.lang.Object
| Constructor and Description |
|---|
SlContext() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Releases the resources managed by the context.
|
static SlContext |
create()
Creates a new context.
|
abstract <T> T |
getService(java.lang.Class<T> service)
Retrieves an instance of a service.
|
public static SlContext create()
The context should be closed when it is no more needed. Once closed, the context cannot be used anymore.
public abstract <T> T getService(java.lang.Class<T> service)
An exception is thrown if the service cannot be provided.
service - The SDK servicenull.public abstract void close()
Once closed, the context cannot be used anymore.