com.supermap.services.event

Class SimpleEventHelper

  • java.lang.Object
    • com.supermap.services.event.SimpleEventHelper


  • public class SimpleEventHelper
    extends java.lang.Object
    

    The simple event message tools Only pass messages in the current thread

    • Constructor Summary

      Constructors 
      Constructor and Description
      SimpleEventHelper() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static <T> boolean addListener(T delegate, T listener)
      Adds a listener
      static <T> T createDelegate(java.lang.Class<T> clz)
      Creates a listener object
      static <T> void removeAllListener(T delegate)
      Removes all current listeners
      static <T> void removeListener(T delegate, T listener)
      Removes the specified listener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleEventHelper

        public SimpleEventHelper()
        
    • Method Detail

      • createDelegate

        public static <T> T createDelegate(java.lang.Class<T> clz)
        

        Creates a listener object

        Parameters:
        clz -
        Returns:
      • addListener

        public static <T> boolean addListener(T delegate,
                              T listener)
        

        Adds a listener

        Parameters:
        delegate -
        listener -
        Returns:
      • removeListener

        public static <T> void removeListener(T delegate,
                              T listener)
        

        Removes the specified listener

        Parameters:
        delegate -
        listener -
      • removeAllListener

        public static <T> void removeAllListener(T delegate)
        

        Removes all current listeners

        Parameters:
        delegate -