Package ch.nolix.system.application.main
Klasse AbstractClient<C extends AbstractClient<C>>
java.lang.Object
ch.nolix.system.application.main.AbstractClient<C>
- Typparameter:
C- is the type of aAbstractClient.
- Alle implementierten Schnittstellen:
Closeable,CloseStateRequestable,GroupCloseable,AutoCloseable
- Bekannte direkte Unterklassen:
AbstractBackendClient,AbstractFrontendClient
public abstract class AbstractClient<C extends AbstractClient<C>>
extends Object
implements GroupCloseable
A
AbstractClient is an end point with comfortable functionalities.- Version:
- 2016-01-01
- Autor:
- Silvan Wyss
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected final Cfinal booleanprotected final INode<?> getDataFromCounterpart(IChainedNode request) protected abstract INode<?> getDataFromHere(IChainedNode request) final Stringfinal ICloseControllerfinal Stringfinal booleanfinal booleanabstract booleanfinal booleanisClosed()protected final booleanabstract booleanfinal booleanfinal booleanfinal booleanprotected abstract voidrunHere(IChainedNode command) Lets the currentAbstractClientrun the given command.protected final voidrunOnCounterpart(ChainedNode command, ChainedNode... commands) Runs the given commands on the counterpart of the currentAbstractClient.protected final voidrunOnCounterpart(IChainedNode command) Runs the given command on the counterpart of the currentAbstractClient.protected final voidrunOnCounterpart(Iterable<? extends IChainedNode> commands) Runs the given commands on the counterpart of the currentAbstractClient.final voidsetSessionVariableWithKeyAndValue(String key, String value) Sets a session variable with the given key and value to the currentAbstractClient.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.resourcecontrolapi.resourceclosingapi.GroupCloseable
close, createCloseDependencyTo, noteClose
-
Konstruktordetails
-
AbstractClient
public AbstractClient()
-
-
Methodendetails
-
containsSessionVariableWithKey
- Parameter:
key-- Gibt zurück:
- true if the current
AbstractClientcontains a session variable with the given key, false otherwise.
-
getStoredCloseController
- Angegeben von:
getStoredCloseControllerin SchnittstelleGroupCloseable- Gibt zurück:
- the
ICloseControllerof the currentGroupCloseable.
-
getSecurityMode
- Gibt zurück:
- the
SecurityModeof the currentAbstractClient.
-
getSessionVariableValueByKey
- Parameter:
key-- Gibt zurück:
- the value of the session variable with the given key from the current
AbstractClient. - Löst aus:
ArgumentDoesNotContainElementException- if the currentAbstractClientdoes not contain a session variable with the given key.
-
getTarget
- Gibt zurück:
- the name of the target
Applicationof the currentAbstractClient.
-
hasRequestedConnection
public final boolean hasRequestedConnection()- Gibt zurück:
- true if the current
AbstractClienthas requested the connection.
-
hasTarget
public final boolean hasTarget()- Gibt zurück:
- true if the current
AbstractClienthas a target.
-
isBackendClient
public abstract boolean isBackendClient()- Gibt zurück:
- true if the current
AbstractClientis a backendAbstractClient.
-
isClosed
public final boolean isClosed()- Angegeben von:
isClosedin SchnittstelleCloseStateRequestable- Angegeben von:
isClosedin SchnittstelleGroupCloseable- Gibt zurück:
- true if the current
CloseStateRequestableis closed.
-
isFrontendClient
public abstract boolean isFrontendClient()- Gibt zurück:
- true if the current
AbstractClientis a frontendAbstractClient.
-
isLocalClient
public final boolean isLocalClient()- Gibt zurück:
- true if the current
AbstractClientis a localAbstractClient.
-
isNetClient
public final boolean isNetClient()- Gibt zurück:
- true if the current
AbstractClientis a netAbstractClient.
-
isWebClient
public final boolean isWebClient()- Gibt zurück:
- true if the current
AbstractClientis a webAbstractClient. - Löst aus:
UnconnectedArgumentException- if the currentAbstractClientis not connected.
-
setSessionVariableWithKeyAndValue
Sets a session variable with the given key and value to the currentAbstractClient. Will overwrite a previous session variable if the currentAbstractClientcontains already a session variable with the given key.- Parameter:
key-value-
-
asConcrete
- Gibt zurück:
- the current
AbstractClientas concreteAbstractClient.
-
getDataFromCounterpart
- Parameter:
request-- Gibt zurück:
- the data the given request requests from the counterpart of the
current
AbstractClient. - Löst aus:
UnconnectedArgumentException- if the currentAbstractClientis not connected.
-
getDataFromHere
- Parameter:
request-- Gibt zurück:
- the data the given request requests from the current
AbstractClient.
-
isConnected
protected final boolean isConnected()- Gibt zurück:
- true if the current
AbstractClientis connected.
-
runHere
Lets the currentAbstractClientrun the given command.- Parameter:
command-
-
runOnCounterpart
Runs the given command on the counterpart of the currentAbstractClient.- Parameter:
command-- Löst aus:
UnconnectedArgumentException- if the currentAbstractClientis not connected.
-
runOnCounterpart
Runs the given commands on the counterpart of the currentAbstractClient.- Parameter:
command-commands-- Löst aus:
UnconnectedArgumentException- if the currentAbstractClientis not connected.
-
runOnCounterpart
Runs the given commands on the counterpart of the currentAbstractClient.- Parameter:
commands-- Löst aus:
UnconnectedArgumentException- if the currentAbstractClientis not connected.
-