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:
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 S
addApplication
(Application<?, ?> application) Adds the given application to the currentAbstractServer
.final S
addApplicationWithNameAddendum
(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 newApplication
with 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 newApplication
with 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 defaultApplication
with 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 newApplication
with the given name, initialSessionClass and a void context as defaultApplication
the currentAbstractServer
.protected abstract S
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
<? extends IApplication<?>> final ICloseController
final Application
<?, ?> final boolean
final boolean
isEmpty()
protected abstract void
noteAddedApplication
(Application<?, ?> application) Notes that the given application has been added to the currentAbstractServer
.protected abstract void
noteAddedDefaultApplication
(Application<?, ?> defaultApplication) Notes that the given defaultApplication has been added to the currentAbstractServer
.final void
Lets the currentGroupCloseable
note a close.protected abstract void
noteRemovedApplication
(IApplication<?> application) Notes that the given application has been removed fromt the currentAbstractServer
.final void
removeApplicationByInstanceName
(String instanceName) Removes theIApplication
with the given instanceName from the currentIServer
.final void
takeClient
(AbstractBackendClient<?, ?> client) Lets the currentAbstractServer
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, getSecurityMode
-
Konstruktordetails
-
AbstractServer
public AbstractServer()
-
-
Methodendetails
-
addApplication
Adds the given application to the currentAbstractServer
.- Parameter:
application
-- Gibt zurück:
- the current
AbstractServer
. - 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 currentAbstractServer
contains already aApplication
with the given instanceName.
-
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 currentAbstractServer
contains already aApplication
with 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 newApplication
with the given instanceName, initialSessionClass and applicationService to the currentAbstractServer
.- Typparameter:
T
- is the type of the given initialSessionClass.C
- is the type of theAbstractBackendClient
of 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 currentAbstractServer
contains already aApplication
with 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 newApplication
with 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 theAbstractBackendClient
of 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 currentAbstractServer
contains already aApplication
with 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 defaultApplication
takes allAbstractClient
s that do not have a target.- Typparameter:
C
- is the type of theAbstractBackendClient
of 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 defaultApplication
with the given name, initialSessionClass and applicationService to the currentAbstractServer
.- Typparameter:
T
- is the type of the given initialSessionClass.C
- is the type of theAbstractBackendClient
of 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 currentAbstractServer
contains already a defaultApplication
.InvalidArgumentException
- if the currentAbstractServer
contains already aApplication
with 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 newApplication
with the given name, initialSessionClass and a void context as defaultApplication
the currentAbstractServer
.- Typparameter:
T
- is the type of the given initialSessionClass.C
- is the type of theAbstractBackendClient
of 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 currentAbstractServer
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
AbstractServer
contains a defaultApplication
.
-
containsApplicationWithName
- Parameter:
name
-- Gibt zurück:
- true if the current
AbstractServer
contains aApplication
with the given name.
-
getStoredApplicationByInstanceName
- Parameter:
instanceName
-- Gibt zurück:
- the
Application
with the given instanceName from the currentAbstractServer
. - Löst aus:
ArgumentDoesNotHaveAttributeException
- if the currentAbstractServer
does not contain aApplication
with the given instanceName.
-
getStoredApplicationByUrlInstanceName
- Parameter:
urlInstanceName
-- Gibt zurück:
- the
Application
with the given urlInstanceName from the currentAbstractServer
. - Löst aus:
ArgumentDoesNotHaveAttributeException
- if the currentAbstractServer
does not contain aApplication
with the given urlInstanceName.
-
getStoredApplications
- Angegeben von:
getStoredApplications
in SchnittstelleIServer
- Gibt zurück:
- the
IApplication
s of the currentIServer
.
-
getStoredCloseController
- Angegeben von:
getStoredCloseController
in SchnittstelleGroupCloseable
- Gibt zurück:
- the
ICloseController
of the currentGroupCloseable
.
-
getStoredDefaultApplication
- Gibt zurück:
- the default
Application
of the currentAbstractServer
. - Löst aus:
ArgumentDoesNotHaveAttributeException
- if the currentAbstractServer
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
AbstractServer
has aAbstractClient
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 currentAbstractServer
take the given client.- Parameter:
client
-- Löst aus:
ArgumentDoesNotHaveAttributeException
- if the given client does not have a target and the currentAbstractServer
does not contain a defaultApplication
.ArgumentDoesNotHaveAttributeException
- if the given client has a target and the currentAbstractServer
does not contain aApplication
with 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
-
-