Enum ControlEvent

    • Enum Constant Detail

      • CtrlBreak

        public static final ControlEvent CtrlBreak
        Control+Break
      • Close

        public static final ControlEvent Close
        either by clicking Close on the console window's window menu, or by clicking the End Task button command from Task Manager
      • Logoff

        public static final ControlEvent Logoff
        A signal that the system sends to all console processes when a user is logging off. This signal does not indicate which user is logging off, so no assumptions can be made. Note that this signal is received only by services. Interactive applications are terminated at logoff, so they are not present when the system sends this signal.
      • Shutdown

        public static final ControlEvent Shutdown
        A signal that the system sends when the system is shutting down. Interactive applications are not present by the time the system sends this signal, therefore it can be received only be services in this situation.
    • Field Detail

      • code

        public final int code
    • Method Detail

      • values

        public static ControlEvent[] 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 (ControlEvent c : ControlEvent.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ControlEvent valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null