Package ch.nolix.system.application.main
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
public abstract class AbstractServer<S extends AbstractServer<S>>
extends Object
implements IServer<S>
- Version:
- 2016-11-01
- Autor:
- Silvan Wyss
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrol.closecontroller.CloseStateRequestable
isOpenVon Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.EmptinessRequestable
containsAnyVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrol.closecontroller.GroupCloseable
close, createCloseDependencyTo, isClosedVon Schnittstelle geerbte Methoden ch.nolix.coreapi.net.netattribute.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>, S addApplicationWithNameAndInitialSessionClassAndContextC extends AbstractBackendClient<C, U>, 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>, S addApplicationWithNameAndInitialSessionClassAndVoidContextC extends AbstractBackendClient<C, Object>> (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>, S addDefaultApplicationU> (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>, S addDefaultApplicationWithNameAndInitialSessionClassAndContextC extends AbstractBackendClient<C, U>, 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>, S addDefaultApplicationWithNameAndInitialSessionClassAndVoidContextC extends AbstractBackendClient<C, Object>> (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
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
AbstractServercontains a defaultApplication.
-
containsApplicationWithName
- Parameter:
name-- Gibt zurück:
- true if the current
AbstractServercontains aApplicationwith the given name.
-
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.
-
hasClientConnected
public final boolean hasClientConnected()- Gibt zurück:
- true if the current
AbstractServerhas aAbstractClientconnected.
-
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-
-