T
- item type.public class LeakagePreventingWrapper<T> extends ContextProperty.Wrapper<T> implements Destructible
ContextProperty
wrapper which tracks the subscribers
and is able to clean them up upon destroy()
method call.ContextProperty.Impl<T>, ContextProperty.Wrapper<T>
log
Constructor and Description |
---|
LeakagePreventingWrapper(ContextProperty<T> delegate) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Perform arbitrary clean-up logic upon component destruction
by the framework.
|
io.reactivex.disposables.Disposable |
observe(Consumer<Optional<T>> action) |
io.reactivex.disposables.Disposable |
observeNullable(Consumer<T> action) |
interceptWith, set, update, update, value
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
nullableValue, set
public LeakagePreventingWrapper(ContextProperty<T> delegate)
public io.reactivex.disposables.Disposable observeNullable(Consumer<T> action)
observeNullable
in interface ContextProperty<T>
observeNullable
in class ContextProperty.Wrapper<T>
public io.reactivex.disposables.Disposable observe(Consumer<Optional<T>> action)
observe
in interface ContextProperty<T>
observe
in class ContextProperty.Wrapper<T>
public void destroy()
Destructible
Note that Destructible.destroy()
method may be called outside of UI thread, e.g.
when the whole instance of admincentral gets disposed as result of heartbeat
checks. This means that neither Magnolia, nor Vaadin thread locals will be reliably
present upon that method invocation.
destroy
in interface Destructible
Copyright © 2020 Magnolia International Ltd.. All rights reserved.