public interface Activatable
deactivate()
is called when
the object is not needed anymore. Otherwise, destruction behavior is
undefined.
If not stated otherwise, activation and deactivation are not thread-safe.
If not stated otherwise, objects may only survive one activation -
deactivation cycle and may not be reactivatable in an ordered way.Modifier and Type | Interface and Description |
---|---|
static class |
Activatable.State
A utility base class which can be used to implement a state pattern which
fulfills the
Activatable interface. |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates all resources that belong to a specific object.
|
void |
deactivate()
Deactivate all resources that are owned by a specific object in order to
correctly tear down.
|
boolean |
isActive()
Tells whether this class is currently active or not.
|
void activate() throws RSBException
RSBException
- generic error related to RSBIllegalStateException
- Might be thrown by implementations to indicate that the
respective instance is already activevoid deactivate() throws RSBException, InterruptedException
RSBException
- generic error related to RSBIllegalStateException
- Might be thrown by implementations to indicate that the
respective instance is not activeInterruptedException
- interrupted while waiting for proper deactivation. Object
might be in an undefined state nowboolean isActive()
true
if activeCopyright © 2018 CoR-Lab. All rights reserved.