Package ch.nolix.system.application.main
Klasse BaseServer<SR extends BaseServer<SR>>
java.lang.Object
ch.nolix.system.application.main.BaseServer<SR>
- Typparameter:
SR- is the type of aBaseServer.
- Alle implementierten Schnittstellen:
Closeable,CloseStateRequestable,GroupCloseable,Clearable,EmptinessRequestable,IServer,AutoCloseable
- Bekannte direkte Unterklassen:
LocalServer,Server,SslServer
- Version:
- 2016-11-01
- Autor:
- Silvan Wyss
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal SRaddApplication(Application<?, ?> application) Adds the given application to the currentBaseServer.final SRaddApplicationWithNameAddendum(Application<?, ?> application, String nameAddendum) Adds the given application with the given instanceName to the currentBaseServer.final <S extends Session<BC,AC>, BC extends BackendClient<BC, AC>, AC>
SRaddApplicationWithNameAndInitialSessionClassAndContext(String applicationName, Class<S> initialSessionClass, AC applicationContext) Adds a newApplicationwith the given instanceName, initialSessionClass and applicationContext to the currentBaseServer.final <S extends Session<BC,Object>, BC extends BackendClient<BC, Object>>
SRaddApplicationWithNameAndInitialSessionClassAndVoidContext(String name, Class<S> initialSessionClass) Adds a newApplicationwith the given name, initialSessionClass and a void context to the currentBaseServer.final <BC extends BackendClient<BC,AC>, AC>
SRaddDefaultApplication(Application<BC, AC> defaultApplication) Adds the given defaultApplication to the currentBaseServer.final <S extends Session<BC,AC>, BC extends BackendClient<BC, AC>, AC>
SRaddDefaultApplicationWithNameAndInitialSessionClassAndContext(String applicationName, Class<S> initialSessionClass, AC applicationContext) Adds a new defaultApplicationwith the given name, initialSessionClass and applicationContext to the currentBaseServer.final <S extends Session<BC,Object>, BC extends BackendClient<BC, Object>>
SRaddDefaultApplicationWithNameAndInitialSessionClassAndVoidContext(String name, Class<S> initialSessionClass) Adds a newApplicationwith the given name, initialSessionClass and a void context as defaultApplicationthe currentBaseServer.protected abstract SRfinal voidclear()Removes the elements of the currentClearable.final booleanfinal booleanfinal Application<?, ?> getStoredApplicationByInstanceName(String instanceName) final Application<?, ?> getStoredApplicationByUrlInstanceName(String urlInstanceName) final IContainer<Application<?, ?>> final CloseControllerfinal Application<?, ?> final booleanfinal booleanisEmpty()protected abstract voidnoteAddedApplication(Application<?, ?> application) Notes that the given application has been added to the currentBaseServer.protected abstract voidnoteAddedDefaultApplication(Application<?, ?> defaultApplication) Notes that the given defaultApplication has been added to the currentBaseServer.final voidLets the currentGroupCloseablenote a close.protected abstract voidnoteRemovedApplication(IApplication<?> application) Notes that the given application has been removed fromt the currentBaseServer.final voidremoveApplicationByInstanceName(String instanceName) Removes theIApplicationwith the given instanceName from the currentIServer.final voidtakeClient(BackendClient<?, ?> client) Lets the currentBaseServertake the given client.Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrolapi.resourceclosingapi.CloseStateRequestable
isOpenVon Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.EmptinessRequestable
containsAnyVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrolapi.resourceclosingapi.GroupCloseable
close, createCloseDependencyTo, isClosedVon Schnittstelle geerbte Methoden ch.nolix.systemapi.applicationapi.mainapi.IServer
asTarget, getSecurityMode
-
Konstruktordetails
-
BaseServer
public BaseServer()
-
-
Methodendetails
-
addApplication
Adds the given application to the currentBaseServer.- Parameter:
application-- Gibt zurück:
- the current
BaseServer. - Löst aus:
ArgumentIsNullException- if the given application is null.ArgumentIsNullException- if the given instanceName is nullInvalidArgumentException- if the given instanceName is blank.InvalidArgumentException- if the currentBaseServercontains already aApplicationwith the given instanceName.
-
addApplicationWithNameAddendum
Adds the given application with the given instanceName to the currentBaseServer.- Parameter:
application-nameAddendum-- Gibt zurück:
- the current
BaseServer. - Löst aus:
ArgumentIsNullException- if the given application is null.ArgumentBelongsToParentException- if the given application belongs already to aBaseServer.ArgumentIsNullException- if the given instanceName is nullInvalidArgumentException- if the given instanceName is blank.InvalidArgumentException- if the currentBaseServercontains already aApplicationwith the given instanceName.
-
addApplicationWithNameAndInitialSessionClassAndContext
public final <S extends Session<BC,AC>, SR addApplicationWithNameAndInitialSessionClassAndContextBC extends BackendClient<BC, AC>, AC> (String applicationName, Class<S> initialSessionClass, AC applicationContext) Adds a newApplicationwith the given instanceName, initialSessionClass and applicationContext to the currentBaseServer.- Typparameter:
S- is the type of the given initialSessionClass.BC- is the type of theBackendClientof the given initialSessionClass.AC- is the type of the given applicationContext.- Parameter:
applicationName-initialSessionClass-applicationContext-- Gibt zurück:
- the current
BaseServer. - Löst aus:
ArgumentIsNullException- if the given instanceName is null.InvalidArgumentException- if the given instanceName is blank.InvalidArgumentException- if the currentBaseServercontains already aApplicationwith the given instanceName.ArgumentIsNullException- if the given initialSessionClass is null.
-
addApplicationWithNameAndInitialSessionClassAndVoidContext
public final <S extends Session<BC,Object>, SR addApplicationWithNameAndInitialSessionClassAndVoidContextBC extends BackendClient<BC, Object>> (String name, Class<S> initialSessionClass) Adds a newApplicationwith the given name, initialSessionClass and a void context to the currentBaseServer.- Typparameter:
S- is the type of the given initialSessionClass.BC- is the type of theBackendClientof the given initialSessionClass.- Parameter:
name-initialSessionClass-- Gibt zurück:
- the current
BaseServer. - Löst aus:
ArgumentIsNullException- if the given name is null.InvalidArgumentException- if the given name is blank.InvalidArgumentException- if the currentBaseServercontains already aApplicationwith an instanceName that equals the given name.ArgumentIsNullException- if the given initialSessionClass is null.
-
addDefaultApplication
public final <BC extends BackendClient<BC,AC>, SR addDefaultApplicationAC> (Application<BC, AC> defaultApplication) Adds the given defaultApplication to the currentBaseServer. A defaultApplicationtakes allClients that do not have a target.- Typparameter:
BC- is the type of theBackendClientof the given defaultApplication.AC- is the type of the context of the given defaultApplication.- Parameter:
defaultApplication-- Gibt zurück:
- the current
BaseServer. - Löst aus:
ArgumentIsNullException- if the given defaultApplication is null.
-
addDefaultApplicationWithNameAndInitialSessionClassAndContext
public final <S extends Session<BC,AC>, SR addDefaultApplicationWithNameAndInitialSessionClassAndContextBC extends BackendClient<BC, AC>, AC> (String applicationName, Class<S> initialSessionClass, AC applicationContext) Adds a new defaultApplicationwith the given name, initialSessionClass and applicationContext to the currentBaseServer.- Typparameter:
S- is the type of the given initialSessionClass.BC- is the type of theBackendClientof the given initialSessionClass.AC- is the type of the given applicationContext.- Parameter:
applicationName-initialSessionClass-applicationContext-- Gibt zurück:
- the current
BaseServer. - Löst aus:
ArgumentIsNullException- if the given instanceName is null.InvalidArgumentException- if the given instanceName is blank.InvalidArgumentException- if the currentBaseServercontains already a defaultApplication.InvalidArgumentException- if the currentBaseServercontains already aApplicationwith the given instanceName.ArgumentIsNullException- if the given initialSessionClass is null.
-
addDefaultApplicationWithNameAndInitialSessionClassAndVoidContext
public final <S extends Session<BC,Object>, SR addDefaultApplicationWithNameAndInitialSessionClassAndVoidContextBC extends BackendClient<BC, Object>> (String name, Class<S> initialSessionClass) Adds a newApplicationwith the given name, initialSessionClass and a void context as defaultApplicationthe currentBaseServer.- Typparameter:
S- is the type of the given initialSessionClass.BC- is the type of theBackendClientof the given initialSessionClass.- Parameter:
name-initialSessionClass-- Gibt zurück:
- the current
BaseServer. - Löst aus:
ArgumentIsNullException- if the given name is null.InvalidArgumentException- if the given name is blank.InvalidArgumentException- if the currentBaseServercontains already aApplicationwith an instanceName that equals the given name.ArgumentIsNullException- if the given initialSessionClass is null.
-
clear
public final void clear()Beschreibung aus Schnittstelle kopiert:ClearableRemoves the elements of the currentClearable. -
containsDefaultApplication
public final boolean containsDefaultApplication()- Gibt zurück:
- true if the current
BaseServercontains a defaultApplication.
-
containsApplicationWithName
- Parameter:
name-- Gibt zurück:
- true if the current
BaseServercontains aApplicationwith the given name.
-
getStoredApplicationByInstanceName
- Parameter:
instanceName-- Gibt zurück:
- the
Applicationwith the given instanceName from the currentBaseServer. - Löst aus:
ArgumentDoesNotHaveAttributeException- if the currentBaseServerdoes not contain aApplicationwith the given instanceName.
-
getStoredApplicationByUrlInstanceName
- Parameter:
urlInstanceName-- Gibt zurück:
- the
Applicationwith the given urlInstanceName from the currentBaseServer. - Löst aus:
ArgumentDoesNotHaveAttributeException- if the currentBaseServerdoes not contain aApplicationwith the given urlInstanceName.
-
getStoredApplications
- Gibt zurück:
- the
Applications of the currentBaseServer.
-
getStoredCloseController
- Angegeben von:
getStoredCloseControllerin SchnittstelleGroupCloseable- Gibt zurück:
- the
ICloseControllerof the currentGroupCloseable.
-
getStoredDefaultApplication
- Gibt zurück:
- the default
Applicationof the currentBaseServer. - Löst aus:
ArgumentDoesNotHaveAttributeException- if the currentBaseServerdoes not contain a defaultApplication.
-
isEmpty
public final boolean isEmpty()- Angegeben von:
isEmptyin SchnittstelleEmptinessRequestable- Gibt zurück:
- true if
EmptinessRequestabledoes not contain an element.
-
hasClientConnected
public final boolean hasClientConnected()- Gibt zurück:
- true if the current
BaseServerhas aClientconnected.
-
noteClose
public final void noteClose()Lets the currentGroupCloseablenote a close.- Angegeben von:
noteClosein SchnittstelleGroupCloseable
-
removeApplicationByInstanceName
Removes theIApplicationwith the given instanceName from the currentIServer.- Angegeben von:
removeApplicationByInstanceNamein SchnittstelleIServer- Parameter:
instanceName-
-
takeClient
Lets the currentBaseServertake the given client.- Parameter:
client-- Löst aus:
ArgumentDoesNotHaveAttributeException- if the given client does not have a target and the currentBaseServerdoes not contain a defaultApplication.ArgumentDoesNotHaveAttributeException- if the given client has a target and the currentBaseServerdoes not contain aApplicationwith a name that equals the given target.
-
asConcrete
- Gibt zurück:
- the current
BaseServer.
-
noteAddedApplication
Notes that the given application has been added to the currentBaseServer.- Parameter:
application-
-
noteAddedDefaultApplication
Notes that the given defaultApplication has been added to the currentBaseServer.- Parameter:
defaultApplication-
-
noteRemovedApplication
Notes that the given application has been removed fromt the currentBaseServer.- Parameter:
application-
-