Package org.forgerock.openig.decoration
Class DecorationHandle
- java.lang.Object
-
- org.forgerock.openig.decoration.DecorationHandle
-
public final class DecorationHandle extends Object
A DecorationHandle is handle to get the decorated object and being able to notify the decoration to stop.
-
-
Constructor Summary
Constructors Constructor Description DecorationHandle(Object decorated)
Constructs a DecorationHandle.DecorationHandle(Object decorated, Runnable onStop)
Constructs a DecorationHandle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStopAction(Runnable onStop)
Adds an action to execute when the decoration stops.Object
getDecorated()
Returns the decorated object.void
stop()
Notifies the handle to stop the decoration.
-
-
-
Constructor Detail
-
DecorationHandle
public DecorationHandle(Object decorated)
Constructs a DecorationHandle.- Parameters:
decorated
- The decorated object.
-
-
Method Detail
-
getDecorated
public Object getDecorated()
Returns the decorated object.- Returns:
- the decorated object.
-
addStopAction
public void addStopAction(Runnable onStop)
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.
-
-