Class ListenerConfig

    • Field Detail

      • className

        protected java.lang.String className
      • implementation

        protected java.util.EventListener implementation
    • Constructor Detail

      • ListenerConfig

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

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

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

      • getClassName

        public java.lang.String getClassName()
        Returns the name of the class of the EventListener. If no class is specified, null is returned.
        Returns:
        the class name of the EventListener
        See Also:
        setClassName(String)
      • setClassName

        public ListenerConfig setClassName​(@Nonnull
                                           java.lang.String className)
        Sets the class name of the EventListener.

        If a implementation was set, it will be removed.

        Parameters:
        className - the name of the class of the EventListener
        Returns:
        the updated ListenerConfig
        Throws:
        java.lang.IllegalArgumentException - if className is null or an empty String
        See Also:
        setImplementation(java.util.EventListener), getClassName()
      • getImplementation

        public java.util.EventListener getImplementation()
        Returns the EventListener implementation. If none has been specified, null is returned.
        Returns:
        the EventListener implementation
        See Also:
        setImplementation(java.util.EventListener)
      • setImplementation

        public ListenerConfig setImplementation​(java.util.EventListener implementation)
        Sets the EventListener implementation.

        If a className was set, it will be removed.

        Parameters:
        implementation - the EventListener implementation
        Returns:
        the updated ListenerConfig
        Throws:
        java.lang.IllegalArgumentException - the implementation is null
        See Also:
        setClassName(String), getImplementation()
      • isIncludeValue

        public boolean isIncludeValue()
      • isLocal

        public boolean isLocal()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeData

        public void writeData​(ObjectDataOutput out)
                       throws java.io.IOException
        Description copied from interface: DataSerializable
        Writes object fields to output stream
        Specified by:
        writeData in interface DataSerializable
        Parameters:
        out - output
        Throws:
        java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
      • readData

        public void readData​(ObjectDataInput in)
                      throws java.io.IOException
        Description copied from interface: DataSerializable
        Reads fields from the input stream
        Specified by:
        readData in interface DataSerializable
        Parameters:
        in - input
        Throws:
        java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object