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
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal SR
addApplication
(Application<?, ?> application) Adds the given application to the currentBaseServer
.final SR
addApplicationWithNameAddendum
(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 newApplication
with 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 newApplication
with 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 defaultApplication
with 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 newApplication
with the given name, initialSessionClass and a void context as defaultApplication
the currentBaseServer
.protected abstract SR
final void
clear()
Removes the elements of the currentClearable
.final boolean
final boolean
final Application
<?, ?> getStoredApplicationByInstanceName
(String instanceName) final Application
<?, ?> getStoredApplicationByUrlInstanceName
(String urlInstanceName) final IContainer
<Application<?, ?>> final CloseController
final Application
<?, ?> final boolean
final boolean
isEmpty()
protected abstract void
noteAddedApplication
(Application<?, ?> application) Notes that the given application has been added to the currentBaseServer
.protected abstract void
noteAddedDefaultApplication
(Application<?, ?> defaultApplication) Notes that the given defaultApplication has been added to the currentBaseServer
.final void
Lets the currentGroupCloseable
note a close.protected abstract void
noteRemovedApplication
(IApplication<?> application) Notes that the given application has been removed fromt the currentBaseServer
.final void
removeApplicationByInstanceName
(String instanceName) Removes theIApplication
with the given instanceName from the currentIServer
.final void
takeClient
(BackendClient<?, ?> client) Lets the currentBaseServer
take the given client.Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrolapi.resourceclosingapi.CloseStateRequestable
isOpen
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.EmptinessRequestable
containsAny
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrolapi.resourceclosingapi.GroupCloseable
close, createCloseDependencyTo, isClosed
Von Schnittstelle geerbte Methoden ch.nolix.systemapi.applicationapi.mainapi.IServer
asTarget, getSecurityLevel
-
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 currentBaseServer
contains already aApplication
with 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 currentBaseServer
contains already aApplication
with 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 newApplication
with the given instanceName, initialSessionClass and applicationContext to the currentBaseServer
.- Typparameter:
S
- is the type of the given initialSessionClass.BC
- is the type of theBackendClient
of 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 currentBaseServer
contains already aApplication
with 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 newApplication
with 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 theBackendClient
of 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 currentBaseServer
contains already aApplication
with 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 defaultApplication
takes allClient
s that do not have a target.- Typparameter:
BC
- is the type of theBackendClient
of 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 defaultApplication
with the given name, initialSessionClass and applicationContext to the currentBaseServer
.- Typparameter:
S
- is the type of the given initialSessionClass.BC
- is the type of theBackendClient
of 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 currentBaseServer
contains already a defaultApplication
.InvalidArgumentException
- if the currentBaseServer
contains already aApplication
with 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 newApplication
with the given name, initialSessionClass and a void context as defaultApplication
the currentBaseServer
.- Typparameter:
S
- is the type of the given initialSessionClass.BC
- is the type of theBackendClient
of 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 currentBaseServer
contains already aApplication
with an instanceName that equals the given name.ArgumentIsNullException
- if the given initialSessionClass is null.
-
clear
public final void clear()Beschreibung aus Schnittstelle kopiert:Clearable
Removes the elements of the currentClearable
. -
containsDefaultApplication
public final boolean containsDefaultApplication()- Gibt zurück:
- true if the current
BaseServer
contains a defaultApplication
.
-
containsApplicationWithName
- Parameter:
name
-- Gibt zurück:
- true if the current
BaseServer
contains aApplication
with the given name.
-
getStoredApplicationByInstanceName
- Parameter:
instanceName
-- Gibt zurück:
- the
Application
with the given instanceName from the currentBaseServer
. - Löst aus:
ArgumentDoesNotHaveAttributeException
- if the currentBaseServer
does not contain aApplication
with the given instanceName.
-
getStoredApplicationByUrlInstanceName
- Parameter:
urlInstanceName
-- Gibt zurück:
- the
Application
with the given urlInstanceName from the currentBaseServer
. - Löst aus:
ArgumentDoesNotHaveAttributeException
- if the currentBaseServer
does not contain aApplication
with the given urlInstanceName.
-
getStoredApplications
- Gibt zurück:
- the
Application
s of the currentBaseServer
.
-
getStoredCloseController
- Angegeben von:
getStoredCloseController
in SchnittstelleGroupCloseable
- Gibt zurück:
- the
ICloseController
of the currentGroupCloseable
.
-
getStoredDefaultApplication
- Gibt zurück:
- the default
Application
of the currentBaseServer
. - Löst aus:
ArgumentDoesNotHaveAttributeException
- if the currentBaseServer
does not contain a defaultApplication
.
-
isEmpty
public final boolean isEmpty()- Angegeben von:
isEmpty
in SchnittstelleEmptinessRequestable
- Gibt zurück:
- true if
EmptinessRequestable
does not contain an element.
-
hasClientConnected
public final boolean hasClientConnected()- Gibt zurück:
- true if the current
BaseServer
has aClient
connected.
-
noteClose
public final void noteClose()Lets the currentGroupCloseable
note a close.- Angegeben von:
noteClose
in SchnittstelleGroupCloseable
-
removeApplicationByInstanceName
Removes theIApplication
with the given instanceName from the currentIServer
.- Angegeben von:
removeApplicationByInstanceName
in SchnittstelleIServer
- Parameter:
instanceName
-
-
takeClient
Lets the currentBaseServer
take the given client.- Parameter:
client
-- Löst aus:
ArgumentDoesNotHaveAttributeException
- if the given client does not have a target and the currentBaseServer
does not contain a defaultApplication
.ArgumentDoesNotHaveAttributeException
- if the given client has a target and the currentBaseServer
does not contain aApplication
with 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
-
-