Interface Server<S extends Server<S>>

Type Parameters:
S - the type of a Server.
All Superinterfaces:
ApplicationManager<Application<?,?>>, AutoCloseable, Clearable, Closeable, EmptinessRequestable, GroupCloseable, OpennessRequestable, SecurityModeHolder
All Known Implementing Classes:
AbstractServer, LocalServer, Server, SslServer

public interface Server<S extends Server<S>> extends Clearable, GroupCloseable, ApplicationManager<Application<?,?>>, SecurityModeHolder
Author:
Silvan Wyss
  • Method Details

    • addApplication

      S addApplication(Application<?,?> application)
      Adds the given application to the current Server.
      Parameters:
      application -
      Returns:
      the current Server
      Throws:
      RuntimeException - if the given application is null
      RuntimeException - if the current Server contains already a Application with the same instanceName as the given application.
    • addDefaultApplication

      <C extends BackendClient<T>, T> S addDefaultApplication(Application<C,T> defaultApplication)
      Adds the given defaultApplication to the current Server.
      Type Parameters:
      C - the type of the BackendClient of the given defaultApplication
      T - the type of the application context of the given defaultApplication
      Parameters:
      defaultApplication -
      Returns:
      the current Server
      Throws:
      RuntimeException - if the given defaultApplication is null
    • asTarget

      IServerTarget asTarget()
      Returns:
      a target representation of the current Server.
    • removeApplicationWithInstanceName

      void removeApplicationWithInstanceName(String instanceName)
      Removes the Application with the given instanceName from the current Server.
      Parameters:
      instanceName -
      Throws:
      RuntimeException - if the current Server does not contain a Application with the given instanceName.