Interface Registration

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
ListenerRegistration<T>, ObjectRegistration<T>
All Known Implementing Classes:
AbstractListenerRegistration, AbstractObjectRegistration, AbstractRegistration, NoOpListenerRegistration, NoOpObjectRegistration

public interface Registration extends AutoCloseable
Class representing a registration. Such a registration is a proper resource and should be cleaned up when no longer required.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Unregisters the object.
  • Method Details

    • close

      void close()
      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.

      The above requirement does not necessarily mean that all interactions with the registered entity seize before this method returns, but they should complete within a reasonable time frame.

      While the interface contract allows an implementation to ignore the occurrence of RuntimeExceptions, implementations are strongly encouraged to deal with such exceptions internally and to ensure invocations of this method do not fail in such circumstances.

      Specified by:
      close in interface AutoCloseable