Class AbstractObjectRegistration<T>
- java.lang.Object
-
- org.opendaylight.yangtools.concepts.AbstractRegistration
-
- org.opendaylight.yangtools.concepts.AbstractObjectRegistration<T>
-
- All Implemented Interfaces:
AutoCloseable
,ObjectRegistration<T>
,Registration
- Direct Known Subclasses:
AbstractListenerRegistration
,AbstractSchemaSourceRegistration
,AbstractYangTextSchemaSourceRegistration
public abstract class AbstractObjectRegistration<T> extends AbstractRegistration implements ObjectRegistration<T>
Utility registration handle. It is a convenience for register-style method which can return an AutoCloseable realized by a subclass of this class. Invoking the close() method triggers unregistration of the state the method installed.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractObjectRegistration(@NonNull T instance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MoreObjects.ToStringHelper
addToStringAttributes(MoreObjects.ToStringHelper toStringHelper)
T
getInstance()
Return the object instance.-
Methods inherited from class org.opendaylight.yangtools.concepts.AbstractRegistration
close, isClosed, removeRegistration, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opendaylight.yangtools.concepts.Registration
close
-
-
-
-
Constructor Detail
-
AbstractObjectRegistration
protected AbstractObjectRegistration(@NonNull T instance)
-
-
Method Detail
-
getInstance
public final T getInstance()
Description copied from interface:ObjectRegistration
Return the object instance.- Specified by:
getInstance
in interfaceObjectRegistration<T>
- Returns:
- Registered object.
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper toStringHelper)
- Overrides:
addToStringAttributes
in classAbstractRegistration
-
-