Class LocalListenerRegistry<T>

java.lang.Object
org.wildfly.clustering.server.local.listener.LocalListenerRegistry<T>
Type Parameters:
T - the listener type
All Implemented Interfaces:
AutoCloseable, Consumer<Consumer<T>>, org.wildfly.clustering.server.listener.ListenerRegistry<T>, org.wildfly.clustering.server.Registrar<T>

public class LocalListenerRegistry<T> extends Object implements org.wildfly.clustering.server.listener.ListenerRegistry<T>
Local ListenerRegistry.
Author:
Paul Ferraro
  • Constructor Details

    • LocalListenerRegistry

      public LocalListenerRegistry(Duration shutdownTimeout)
      Creates a local listener registrar with the specified shutdown timeout.
      Parameters:
      shutdownTimeout - the duration of time to wait for termination of listener tasks on close.
  • Method Details

    • register

      public org.wildfly.clustering.server.Registration register(T listener)
      Specified by:
      register in interface org.wildfly.clustering.server.Registrar<T>
    • accept

      public void accept(Consumer<T> event)
      Specified by:
      accept in interface Consumer<T>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.wildfly.clustering.server.listener.ListenerRegistry<T>