Enum EConfigure.DispatcherType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<EConfigure.DispatcherType>
    Enclosing class:
    EConfigure

    public static enum EConfigure.DispatcherType
    extends java.lang.Enum<EConfigure.DispatcherType>
    Enumerates the supported eBus dispatcher thread types. There are effectively two dispatcher types: eBus and GUI with GUI divided between Swing and JavaFX.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      EBUS
      Default eBus dispatcher based on a run queue, so the dispatcher method is EClient.doDispatch(Runnable).
      JAVAFX
      Posts a task to the JavaFX GUI thread using javafx.application.Platform.runLater(Runnable).
      SWING
      Posts a task to the Swing GUI thread using javax.swing.SwingUtilities.invokeLater(Runnable).
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.function.Consumer<java.lang.Runnable> dispatchHandle()
      Returns the task dispatch method handle.
      static EConfigure.DispatcherType findType​(java.lang.String name)
      Returns the EConfigure.DispatcherType for the given name using case-insensitive string matching.
      boolean isSpecial()
      Returns true if this dispatcher type is a special, non-configurable dispatcher.
      static EConfigure.DispatcherType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static EConfigure.DispatcherType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • EBUS

        public static final EConfigure.DispatcherType EBUS
        Default eBus dispatcher based on a run queue, so the dispatcher method is EClient.doDispatch(Runnable).
      • JAVAFX

        public static final EConfigure.DispatcherType JAVAFX
        Posts a task to the JavaFX GUI thread using javafx.application.Platform.runLater(Runnable).
      • SWING

        public static final EConfigure.DispatcherType SWING
        Posts a task to the Swing GUI thread using javax.swing.SwingUtilities.invokeLater(Runnable).
    • Method Detail

      • values

        public static EConfigure.DispatcherType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EConfigure.DispatcherType c : EConfigure.DispatcherType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EConfigure.DispatcherType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isSpecial

        public boolean isSpecial()
        Returns true if this dispatcher type is a special, non-configurable dispatcher.
        Returns:
        true if a special dispatcher.
      • dispatchHandle

        public java.util.function.Consumer<java.lang.Runnable> dispatchHandle()
        Returns the task dispatch method handle. May be null.
        Returns:
        dispatch method handle.
      • findType

        public static EConfigure.DispatcherType findType​(java.lang.String name)
        Returns the EConfigure.DispatcherType for the given name using case-insensitive string matching. If name is either null or an empty string, then returns EBUS by default.
        Parameters:
        name - find dispatcher type with the given name using case-insensitive matching.
        Returns:
        matching dispatcher type; defaults to EBUS.