Klasse AbstractServer<S extends AbstractServer<S>>
java.lang.Object
ch.nolix.system.application.main.AbstractServer<S>
- Typparameter:
S- is the type of aAbstractServer.
- Alle implementierten Schnittstellen:
IApplicationManager<IApplication<?,?>>, ISecuriyModeHolder, Closeable, CloseStateRequestable, GroupCloseable, Clearable, EmptinessRequestable, IServer<S>, AutoCloseable
- Bekannte direkte Unterklassen:
LocalServer, Server, SslServer
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifikator und TypMethodeBeschreibungfinal SaddApplication(IApplication<?, ?> application) Adds the given application to the currentIServer.final SaddApplicationWithNameAddendum(Application<?, ?> application, String nameAddendum) Adds the given application with the given instanceName to the currentAbstractServer.final <T extends AbstractSession<C,U>, C extends AbstractBackendClient<C, U>, U>
SaddApplicationWithNameAndInitialSessionClassAndContext(String applicationName, Class<T> initialSessionClass, U applicationService) Adds a newApplicationwith the given instanceName, initialSessionClass and applicationService to the currentAbstractServer.final <T extends AbstractSession<C,Object>, C extends AbstractBackendClient<C, Object>>
SaddApplicationWithNameAndInitialSessionClassAndVoidContext(String name, Class<T> initialSessionClass) Adds a newApplicationwith the given name, initialSessionClass and a void context to the currentAbstractServer.final <C extends AbstractBackendClient<C,U>, U>
SaddDefaultApplication(Application<C, U> defaultApplication) Adds the given defaultApplication to the currentAbstractServer.final <T extends AbstractSession<C,U>, C extends AbstractBackendClient<C, U>, U>
SaddDefaultApplicationWithNameAndInitialSessionClassAndContext(String applicationName, Class<T> initialSessionClass, U applicationService) Adds a new defaultApplicationwith the given name, initialSessionClass and applicationService to the currentAbstractServer.final <T extends AbstractSession<C,Object>, C extends AbstractBackendClient<C, Object>>
SaddDefaultApplicationWithNameAndInitialSessionClassAndVoidContext(String name, Class<T> initialSessionClass) Adds a newApplicationwith the given name, initialSessionClass and a void context as defaultApplicationthe currentAbstractServer.protected abstract Sfinal voidclear()Removes the elements of the currentClearable.final booleanfinal booleanfinal Application<?, ?> getStoredApplicationByInstanceName(String instanceName) final Application<?, ?> getStoredApplicationByUrlInstanceName(String urlInstanceName) final IContainer<? extends IApplication<?, ?>> final ICloseControllerfinal Application<?, ?> final booleanfinal booleanisEmpty()protected abstract voidnoteAddedApplication(Application<?, ?> application) Notes that the given application has been added to the currentAbstractServer.protected abstract voidnoteAddedDefaultApplication(Application<?, ?> defaultApplication) Notes that the given defaultApplication has been added to the currentAbstractServer.final voidLets the currentGroupCloseablenote a close.protected abstract voidnoteRemovedApplication(IApplication<?, ?> application) Notes that the given application has been removed fromt the currentAbstractServer.final voidremoveApplicationWithInstanceName(String instanceName) Removes theIApplicationwith the given instanceName from the currentIServer.final voidtakeClient(AbstractBackendClient<?, ?> client) Lets the currentAbstractServertake the given client.Von Klasse geerbte Methoden Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden CloseStateRequestable
isOpenVon Schnittstelle geerbte Methoden EmptinessRequestable
containsAnyVon Schnittstelle geerbte Methoden GroupCloseable
close, createCloseDependencyTo, isClosedVon Schnittstelle geerbte Methoden ISecuriyModeHolder
getSecurityMode
-
Konstruktordetails
-
AbstractServer
public AbstractServer()
-
-
Methodendetails
-
addApplication
Adds the given application to the currentIServer.- Angegeben von:
addApplicationin SchnittstelleIServer<S extends AbstractServer<S>>- Parameter:
application-- Gibt zurück:
- the current
IServer.
-
addApplicationWithNameAddendum
Adds the given application with the given instanceName to the currentAbstractServer.- Parameter:
application-nameAddendum-- Gibt zurück:
- the current
AbstractServer. - Löst aus:
ArgumentIsNullException- if the given application is null.ArgumentBelongsToParentException- if the given application belongs already to aAbstractServer.ArgumentIsNullException- if the given instanceName is nullInvalidArgumentException- if the given instanceName is blank.InvalidArgumentException- if the currentAbstractServercontains already aApplicationwith the given instanceName.
-
addApplicationWithNameAndInitialSessionClassAndContext
public final <T extends AbstractSession<C,U>, C extends AbstractBackendClient<C, S addApplicationWithNameAndInitialSessionClassAndContextU>, U> (String applicationName, Class<T> initialSessionClass, U applicationService) Adds a newApplicationwith the given instanceName, initialSessionClass and applicationService to the currentAbstractServer.- Typparameter:
T- is the type of the given initialSessionClass.C- is the type of theAbstractBackendClientof the given initialSessionClass.U- is the type of the given applicationService.- Parameter:
applicationName-initialSessionClass-applicationService-- Gibt zurück:
- the current
AbstractServer. - Löst aus:
ArgumentIsNullException- if the given instanceName is null.InvalidArgumentException- if the given instanceName is blank.InvalidArgumentException- if the currentAbstractServercontains already aApplicationwith the given instanceName.ArgumentIsNullException- if the given initialSessionClass is null.
-
addApplicationWithNameAndInitialSessionClassAndVoidContext
public final <T extends AbstractSession<C,Object>, C extends AbstractBackendClient<C, S addApplicationWithNameAndInitialSessionClassAndVoidContextObject>> (String name, Class<T> initialSessionClass) Adds a newApplicationwith the given name, initialSessionClass and a void context to the currentAbstractServer.- Typparameter:
T- is the type of the given initialSessionClass.C- is the type of theAbstractBackendClientof the given initialSessionClass.- Parameter:
name-initialSessionClass-- Gibt zurück:
- the current
AbstractServer. - Löst aus:
ArgumentIsNullException- if the given name is null.InvalidArgumentException- if the given name is blank.InvalidArgumentException- if the currentAbstractServercontains already aApplicationwith an instanceName that equals the given name.ArgumentIsNullException- if the given initialSessionClass is null.
-
addDefaultApplication
public final <C extends AbstractBackendClient<C,U>, U> S addDefaultApplication(Application<C, U> defaultApplication) Adds the given defaultApplication to the currentAbstractServer. A defaultApplicationtakes allAbstractClients that do not have a target.- Typparameter:
C- is the type of theAbstractBackendClientof the given defaultApplication.U- is the type of the context of the given defaultApplication.- Parameter:
defaultApplication-- Gibt zurück:
- the current
AbstractServer. - Löst aus:
ArgumentIsNullException- if the given defaultApplication is null.
-
addDefaultApplicationWithNameAndInitialSessionClassAndContext
public final <T extends AbstractSession<C,U>, C extends AbstractBackendClient<C, S addDefaultApplicationWithNameAndInitialSessionClassAndContextU>, U> (String applicationName, Class<T> initialSessionClass, U applicationService) Adds a new defaultApplicationwith the given name, initialSessionClass and applicationService to the currentAbstractServer.- Typparameter:
T- is the type of the given initialSessionClass.C- is the type of theAbstractBackendClientof the given initialSessionClass.U- is the type of the given applicationService.- Parameter:
applicationName-initialSessionClass-applicationService-- Gibt zurück:
- the current
AbstractServer. - Löst aus:
ArgumentIsNullException- if the given instanceName is null.InvalidArgumentException- if the given instanceName is blank.InvalidArgumentException- if the currentAbstractServercontains already a defaultApplication.InvalidArgumentException- if the currentAbstractServercontains already aApplicationwith the given instanceName.ArgumentIsNullException- if the given initialSessionClass is null.
-
addDefaultApplicationWithNameAndInitialSessionClassAndVoidContext
public final <T extends AbstractSession<C,Object>, C extends AbstractBackendClient<C, S addDefaultApplicationWithNameAndInitialSessionClassAndVoidContextObject>> (String name, Class<T> initialSessionClass) Adds a newApplicationwith the given name, initialSessionClass and a void context as defaultApplicationthe currentAbstractServer.- Typparameter:
T- is the type of the given initialSessionClass.C- is the type of theAbstractBackendClientof the given initialSessionClass.- Parameter:
name-initialSessionClass-- Gibt zurück:
- the current
AbstractServer. - Löst aus:
ArgumentIsNullException- if the given name is null.InvalidArgumentException- if the given name is blank.InvalidArgumentException- if the currentAbstractServercontains already aApplicationwith an instanceName that equals the given name.ArgumentIsNullException- if the given initialSessionClass is null.
-
clear
-
containsDefaultApplication
public final boolean containsDefaultApplication()- Gibt zurück:
- true if the current
AbstractServercontains a defaultApplication, false otherwise.
-
containsApplicationWithName
- Parameter:
name-- Gibt zurück:
- true if the current
AbstractServercontains aApplicationwith the given name, false otherwise.
-
getStoredApplicationByInstanceName
- Parameter:
instanceName-- Gibt zurück:
- the
Applicationwith the given instanceName from the currentAbstractServer. - Löst aus:
ArgumentDoesNotHaveAttributeException- if the currentAbstractServerdoes not contain aApplicationwith the given instanceName.
-
getStoredApplicationByUrlInstanceName
- Parameter:
urlInstanceName-- Gibt zurück:
- the
Applicationwith the given urlInstanceName from the currentAbstractServer. - Löst aus:
ArgumentDoesNotHaveAttributeException- if the currentAbstractServerdoes not contain aApplicationwith the given urlInstanceName.
-
getStoredApplications
- Angegeben von:
getStoredApplicationsin SchnittstelleIApplicationManager<S extends AbstractServer<S>>- Gibt zurück:
- the applications of the current
IApplicationManager.
-
getStoredCloseController
- Angegeben von:
getStoredCloseControllerin SchnittstelleGroupCloseable- Gibt zurück:
- the
ICloseControllerof the currentGroupCloseable.
-
getStoredDefaultApplication
- Gibt zurück:
- the default
Applicationof the currentAbstractServer. - Löst aus:
ArgumentDoesNotHaveAttributeException- if the currentAbstractServerdoes not contain a defaultApplication.
-
isEmpty
public final boolean isEmpty()- Angegeben von:
isEmptyin SchnittstelleEmptinessRequestable- Gibt zurück:
- true if
EmptinessRequestabledoes not contain an element, false otherwise.
-
hasClientConnected
public final boolean hasClientConnected()- Gibt zurück:
- true if the current
AbstractServerhas aAbstractClientconnected, false otherwise.
-
noteClose
public final void noteClose()Lets the currentGroupCloseablenote a close.- Angegeben von:
noteClosein SchnittstelleGroupCloseable
-
removeApplicationWithInstanceName
Removes theIApplicationwith the given instanceName from the currentIServer.- Angegeben von:
removeApplicationWithInstanceNamein SchnittstelleIServer<S extends AbstractServer<S>>- Parameter:
instanceName-
-
takeClient
Lets the currentAbstractServertake the given client.- Parameter:
client-- Löst aus:
ArgumentDoesNotHaveAttributeException- if the given client does not have a target and the currentAbstractServerdoes not contain a defaultApplication.ArgumentDoesNotHaveAttributeException- if the given client has a target and the currentAbstractServerdoes not contain aApplicationwith a name that equals the given target.
-
asConcrete
- Gibt zurück:
- the current
AbstractServer.
-
noteAddedApplication
Notes that the given application has been added to the currentAbstractServer.- Parameter:
application-
-
noteAddedDefaultApplication
Notes that the given defaultApplication has been added to the currentAbstractServer.- Parameter:
defaultApplication-
-
noteRemovedApplication
Notes that the given application has been removed fromt the currentAbstractServer.- Parameter:
application-
-