Interface Server<S extends Server<S>>
- Type Parameters:
S- the type of aServer.
- 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 Summary
Modifier and TypeMethodDescriptionaddApplication(Application<?, ?> application) Adds the given application to the currentServer.<C extends BackendClient<T>, T>
SaddDefaultApplication(Application<C, T> defaultApplication) Adds the given defaultApplication to the currentServer.asTarget()voidremoveApplicationWithInstanceName(String instanceName) Removes theApplicationwith the given instanceName from the currentServer.Methods inherited from interface ApplicationManager
getStoredApplicationsMethods inherited from interface EmptinessRequestable
containsAny, isEmptyMethods inherited from interface GroupCloseable
close, createCloseDependencyTo, getStoredCloseController, isClosed, noteCloseMethods inherited from interface OpennessRequestable
isOpenMethods inherited from interface SecurityModeHolder
getSecurityMode
-
Method Details
-
addApplication
Adds the given application to the currentServer.- Parameters:
application-- Returns:
- the current
Server - Throws:
RuntimeException- if the given application is nullRuntimeException- if the currentServercontains already aApplicationwith the same instanceName as the given application.
-
addDefaultApplication
Adds the given defaultApplication to the currentServer.- Type Parameters:
C- the type of theBackendClientof the given defaultApplicationT- 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
Removes theApplicationwith the given instanceName from the currentServer.- Parameters:
instanceName-- Throws:
RuntimeException- if the currentServerdoes not contain aApplicationwith the given instanceName.
-