Package org.forgerock.openig.decoration
Class DecorationHandle
java.lang.Object
org.forgerock.openig.decoration.DecorationHandle
A DecorationHandle is handle to get the decorated object and being able to notify the decoration to stop.
-
Constructor Summary
ConstructorDescriptionDecorationHandle
(Object decorated) Constructs a DecorationHandle.DecorationHandle
(Object decorated, Runnable onStop) Constructs a DecorationHandle. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStopAction
(Runnable onStop) Adds an action to execute when the decoration stops.Returns the decorated object.void
stop()
Notifies the handle to stop the decoration.
-
Constructor Details
-
DecorationHandle
Constructs a DecorationHandle.- Parameters:
decorated
- The decorated object.
-
DecorationHandle
Constructs a DecorationHandle.- Parameters:
decorated
- The decorated object.onStop
- The action to execute when the decoration is stopped.
-
-
Method Details
-
getDecorated
Returns the decorated object.- Returns:
- the decorated object.
-
addStopAction
Adds an action to execute when the decoration stops.- Parameters:
onStop
- The action to execute when the decoration is stopped.
-
stop
public void stop()Notifies the handle to stop the decoration.
-