Class ListenerConfig

java.lang.Object
com.hazelcast.config.ListenerConfig
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable
Direct Known Subclasses:
CachePartitionLostListenerConfig, EntryListenerConfig, ItemListenerConfig, MapPartitionLostListenerConfig, SplitBrainProtectionListenerConfig

public class ListenerConfig
extends Object
implements IdentifiedDataSerializable
Contains the configuration for an EventListener. The configuration contains either the classname of the EventListener implementation, or the actual EventListener instance.
  • Field Details

    • className

      protected String className
    • implementation

      protected EventListener implementation
  • Constructor Details

    • ListenerConfig

      public ListenerConfig()
      Creates a ListenerConfig without className/implementation.
    • ListenerConfig

      public ListenerConfig​(String className)
      Creates a ListenerConfig with the given className.
      Parameters:
      className - the name of the EventListener class
      Throws:
      IllegalArgumentException - if className is null or an empty String
    • ListenerConfig

      public ListenerConfig​(EventListener implementation)
      Creates a ListenerConfig with the given implementation.
      Parameters:
      implementation - the implementation to use as EventListener
      Throws:
      IllegalArgumentException - if the implementation is null
    • ListenerConfig

      public ListenerConfig​(ListenerConfig config)
  • Method Details