public abstract class Context<R extends Resource> extends Object implements Resource
Resource that allows other Resources to be registered with it.
Context implementation overrides beforeCheckpoint and afterRestore, defining how the notification about checkpoint and restore will be distributed by the Context hierarchy.
A Context implementor is encouraged to respect properties of the global Context.
| Modifier | Constructor and Description |
|---|---|
protected |
Context()
Creates a
Context. |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
afterRestore(Context<? extends Resource> context)
Invoked by a
Context as a notification about restore. |
abstract void |
beforeCheckpoint(Context<? extends Resource> context)
Invoked by a
Context as a notification about checkpoint. |
abstract void |
register(R resource)
Registers a
Resource with this Context. |
public abstract void beforeCheckpoint(Context<? extends Resource> context) throws CheckpointException
ResourceContext as a notification about checkpoint.beforeCheckpoint in interface Resourcecontext - Context providing notificationCheckpointExceptionpublic abstract void afterRestore(Context<? extends Resource> context) throws RestoreException
ResourceContext as a notification about restore.afterRestore in interface Resourcecontext - Context providing notificationRestoreExceptionpublic abstract void register(R resource)
Resource with this Context.resource - Resource to be registered.NullPointerException - if resource is nullCopyright © 2022. All rights reserved.