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 ApplicationManager<Application<?,?>>, Clearable, GroupCloseable, SecurityModeHolder
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescription<C extends BackendClient<C,T>, T>
SaddApplication(Application<C, T> application) Adds the given application to the currentServer.<C extends BackendClient<C,T>, T>
SaddDefaultApplication(Application<C, T> defaultApplication) Adds the given defaultApplication to the currentServer.booleanbooleanApplication<?, ?> Application<?, ?> getStoredApplicationByUrlName(String urlName) Application<?, ?> booleanvoidRemoves theApplicationwith the given name from the currentServer.toTarget()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.- Type Parameters:
C- the type of theBackendClients of the given applicationT- the type of the application service of the given application- Parameters:
application-- Returns:
- the current
Server - Throws:
RuntimeException- if the given application is nullRuntimeException- if the currentServercontains already aApplicationwith the same name or URL name as the given application
-
addDefaultApplication
Adds the given defaultApplication to the currentServer.- Type Parameters:
C- the type of theBackendClients of the given defaultApplicationT- the type of the application service of the given defaultApplication- Parameters:
defaultApplication-- Returns:
- the current
Server - Throws:
RuntimeException- if the given defaultApplication is nullRuntimeException- if the currentServercontains already aApplicationwith the same name or URL name as the given defaultApplication
-
containsApplicationWithName
- Parameters:
name-- Returns:
- true if the current
Servercontains aApplicationwith the given name, false otherwise
-
containsDefaultApplication
boolean containsDefaultApplication()- Returns:
- true if the current
Servercontains a defaultApplication, false otherwise
-
getStoredApplicationByName
- Parameters:
name-- Returns:
- the
Applicationwith the given name from the currentServer - Throws:
RuntimeException- if the currentServerdoes not contain aApplicationwith the given name.
-
getStoredApplicationByUrlName
- Parameters:
urlName-- Returns:
- the
Applicationwith the given urlName from the currentServer - Throws:
RuntimeException- if the currentServerdoes not contain aApplicationwith the given urlName.
-
getStoredDefaultApplication
Application<?,?> getStoredDefaultApplication()- Returns:
- the default
Applicationof the currentServer - Throws:
RuntimeException- if the currentServerdoes not contain a defaultApplication.
-
hasClientConnected
-
removeApplicationByName
Removes theApplicationwith the given name from the currentServer.- Parameters:
name-- Throws:
RuntimeException- if the currentServerdoes not contain aApplicationwith the given instanceName
-
toTarget
IServerTarget toTarget()- Returns:
- a
IServerTargetrepresentation of the currentServer
-