Enum Class Schema

java.lang.Object
java.lang.Enum<Schema>
de.iip_ecosphere.platform.support.Schema
All Implemented Interfaces:
Serializable, Comparable<Schema>, Constable

public enum Schema extends Enum<Schema>
Lists common relevant protocol schemas.
Author:
Holger Eichelberger, SSE
  • Enum Constant Details

    • HTTP

      public static final Schema HTTP
      HTTP unencrypted.
    • HTTPS

      public static final Schema HTTPS
      HTTP encrypted.
    • TCP

      public static final Schema TCP
      TCP unencrypted.
    • SSL

      public static final Schema SSL
      TCP TLS-encrypted.
    • WS

      public static final Schema WS
      Not-encrypted websockets.
    • SSH

      public static final Schema SSH
      SSH.
    • IGNORE

      public static final Schema IGNORE
      Use whatever you like.
  • Field Details

    • uriSchema

      private String uriSchema
    • isEncrypted

      private boolean isEncrypted
  • Constructor Details

    • Schema

      private Schema(String uriSchema, boolean isEncryted)
      Creates a constant.
      Parameters:
      uriSchema - the URL schema prefix, may be empty for none
      isEncryted - true for encrypted, false for plaintext
  • Method Details

    • values

      public static Schema[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Schema valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isEncrypted

      public boolean isEncrypted()
      Returns whether this schema is supposed to be encrypted.
      Returns:
      true for encrypted, false for plaintext
    • toUri

      public String toUri()
      Returns the URI schema prefix.
      Returns:
      the URI schema prefix, may be empty for none