Class HTTPListenerConfiguration

java.lang.Object
io.fusionauth.http.server.HTTPListenerConfiguration

public class HTTPListenerConfiguration extends Object
A listener configuration that is used to construct the HTTP server and bind various listeners.
Author:
Brian Pontarelli
  • Constructor Details

    • HTTPListenerConfiguration

      public HTTPListenerConfiguration(int port)
      Stores the configuration for a single HTTP listener for the server. This constructor sets up a non-TLS based listener that binds to all the network interfaces of the server.
      Parameters:
      port - The port of this listener.
    • HTTPListenerConfiguration

      public HTTPListenerConfiguration(int port, String certificate, String privateKey) throws GeneralSecurityException
      Stores the configuration for a single HTTP listener for the server. This constructor sets up a TLS based listener.
      Parameters:
      port - The port of this listener.
      certificate - The certificate as a PEM encoded X.509 certificate String. May include intermediate CA certificates.
      privateKey - The private key as a PKCS8 encoded DER private key.
      Throws:
      GeneralSecurityException - If the private key or certificate Strings were not valid and could not be parsed.
    • HTTPListenerConfiguration

      public HTTPListenerConfiguration(int port, Certificate certificate, PrivateKey privateKey)
      Stores the configuration for a single HTTP listener for the server. This constructor sets up a TLS based listener.
      Parameters:
      port - The port of this listener.
      certificate - The certificate Object.
      privateKey - The private key Object.
    • HTTPListenerConfiguration

      public HTTPListenerConfiguration(int port, Certificate[] certificateChain, PrivateKey privateKey)
      Stores the configuration for a single HTTP listener for the server. This constructor sets up a TLS based listener using the supplied certificate chain.
      Parameters:
      port - The port of this listener.
      certificateChain - The certificate Object.
      privateKey - The private key Object.
    • HTTPListenerConfiguration

      public HTTPListenerConfiguration(InetAddress bindAddress, int port)
      Stores the configuration for a single HTTP listener for the server. This constructor sets up a non-TLS based listener.
      Parameters:
      bindAddress - The bind address of this listener.
      port - The port of this listener.
    • HTTPListenerConfiguration

      public HTTPListenerConfiguration(InetAddress bindAddress, int port, String certificate, String privateKey) throws GeneralSecurityException
      Stores the configuration for a single HTTP listener for the server. This constructor sets up a TLS based listener.
      Parameters:
      bindAddress - The bind address of this listener.
      port - The port of this listener.
      certificate - The certificate as a PEM ecnoded X.509 certificate String.
      privateKey - The private key as a PKCS8 encoded DER private key.
      Throws:
      GeneralSecurityException - If the private key or certificate Strings were not valid and could not be parsed.
    • HTTPListenerConfiguration

      public HTTPListenerConfiguration(InetAddress bindAddress, int port, Certificate certificate, PrivateKey privateKey)
      Stores the configuration for a single HTTP listener for the server. This constructor sets up a TLS based listener.
      Parameters:
      bindAddress - The bind address of this listener.
      port - The port of this listener.
      certificate - The certificate Object.
      privateKey - The private key Object.
  • Method Details

    • getBindAddress

      public InetAddress getBindAddress()
    • getCertificate

      public Certificate getCertificate()
    • getCertificateChain

      public Certificate[] getCertificateChain()
    • getPort

      public int getPort()
    • getPrivateKey

      public PrivateKey getPrivateKey()
    • isTLS

      public boolean isTLS()