Class NoOpObjectRegistration<T>

java.lang.Object
org.opendaylight.yangtools.concepts.NoOpObjectRegistration<T>
Type Parameters:
T - Type of registered object
All Implemented Interfaces:
AutoCloseable, Immutable, ObjectRegistration<T>, Registration
Direct Known Subclasses:
NoOpListenerRegistration

@NonNullByDefault public class NoOpObjectRegistration<T> extends Object implements Immutable, ObjectRegistration<T>
Implementation of ObjectRegistration which does nothing in its close() method.
  • Method Details

    • of

      public static <T> ObjectRegistration<T> of(T instance)
    • getInstance

      public final T getInstance()
      Description copied from interface: ObjectRegistration
      Return the object instance.
      Specified by:
      getInstance in interface ObjectRegistration<T>
      Returns:
      Registered object.
    • close

      public final void close()
      Description copied from interface: Registration
      Unregisters the object. This operation is required not to invoke blocking operations. Implementations which require interaction with outside world must provide guarantees that any work is done behind the scenes and the unregistration process looks as if it has already succeeded once this method returns.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Registration
    • toString

      public final String toString()
      Overrides:
      toString in class Object