Enum UpdatePolicy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<UpdatePolicy>

    public enum UpdatePolicy
    extends java.lang.Enum<UpdatePolicy>
    The policy attribute indicates the preference for how the JNLP Client should handle an application update when it is known an update is available before the application is launched, and can have one of the following three values: "always", "prompt-update", and "prompt-run".

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALWAYS
      A value of "always" (default) means to always download updates without any prompt.
      PROMPT_RUN
      A value of "prompt-run" means to ask the user if he/she wants to download and run the updated version, or cancel and abort running the application.
      PROMPT_UPDATE
      A value of "prompt-update" means to ask the user if he/she wants to download and run the updated version, or launch the cached version.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String value  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private UpdatePolicy​(java.lang.String value)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getValue()
      The attribute value name as used in the JSR-56 specification or the Parser.
      static UpdatePolicy valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static UpdatePolicy[] 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

      • ALWAYS

        public static final UpdatePolicy ALWAYS
        A value of "always" (default) means to always download updates without any prompt.
      • PROMPT_UPDATE

        public static final UpdatePolicy PROMPT_UPDATE
        A value of "prompt-update" means to ask the user if he/she wants to download and run the updated version, or launch the cached version.
      • PROMPT_RUN

        public static final UpdatePolicy PROMPT_RUN
        A value of "prompt-run" means to ask the user if he/she wants to download and run the updated version, or cancel and abort running the application.
    • Field Detail

      • value

        private final java.lang.String value
    • Constructor Detail

      • UpdatePolicy

        private UpdatePolicy​(java.lang.String value)
    • Method Detail

      • values

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

        public static UpdatePolicy 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
      • getValue

        public java.lang.String getValue()
        The attribute value name as used in the JSR-56 specification or the Parser.
        Returns:
        the attribute value name