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 C
final boolean
protected final INode
<?> getDataFromCounterpart
(IChainedNode request) protected abstract INode
<?> getDataFromHere
(IChainedNode request) final String
final ICloseController
final String
final boolean
final boolean
abstract boolean
final boolean
isClosed()
protected final boolean
abstract boolean
final boolean
final boolean
final boolean
protected abstract void
runHere
(IChainedNode command) Lets the currentAbstractClient
run the given command.protected final void
runOnCounterpart
(ChainedNode command, ChainedNode... commands) Runs the given commands on the counterpart of the currentAbstractClient
.protected final void
runOnCounterpart
(IChainedNode command) Runs the given command on the counterpart of the currentAbstractClient
.protected final void
runOnCounterpart
(Iterable<? extends IChainedNode> commands) Runs the given commands on the counterpart of the currentAbstractClient
.final void
setSessionVariableWithKeyAndValue
(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, wait
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrolapi.resourceclosingapi.CloseStateRequestable
isOpen
Von 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
AbstractClient
contains a session variable with the given key, false otherwise.
-
getStoredCloseController
- Angegeben von:
getStoredCloseController
in SchnittstelleGroupCloseable
- Gibt zurück:
- the
ICloseController
of the currentGroupCloseable
.
-
getSecurityMode
- Gibt zurück:
- the
SecurityMode
of 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 currentAbstractClient
does not contain a session variable with the given key.
-
getTarget
- Gibt zurück:
- the name of the target
Application
of the currentAbstractClient
.
-
hasRequestedConnection
public final boolean hasRequestedConnection()- Gibt zurück:
- true if the current
AbstractClient
has requested the connection.
-
hasTarget
public final boolean hasTarget()- Gibt zurück:
- true if the current
AbstractClient
has a target.
-
isBackendClient
public abstract boolean isBackendClient()- Gibt zurück:
- true if the current
AbstractClient
is a backendAbstractClient
.
-
isClosed
public final boolean isClosed()- Angegeben von:
isClosed
in SchnittstelleCloseStateRequestable
- Angegeben von:
isClosed
in SchnittstelleGroupCloseable
- Gibt zurück:
- true if the current
CloseStateRequestable
is closed.
-
isFrontendClient
public abstract boolean isFrontendClient()- Gibt zurück:
- true if the current
AbstractClient
is a frontendAbstractClient
.
-
isLocalClient
public final boolean isLocalClient()- Gibt zurück:
- true if the current
AbstractClient
is a localAbstractClient
.
-
isNetClient
public final boolean isNetClient()- Gibt zurück:
- true if the current
AbstractClient
is a netAbstractClient
.
-
isWebClient
public final boolean isWebClient()- Gibt zurück:
- true if the current
AbstractClient
is a webAbstractClient
. - Löst aus:
UnconnectedArgumentException
- if the currentAbstractClient
is not connected.
-
setSessionVariableWithKeyAndValue
Sets a session variable with the given key and value to the currentAbstractClient
. Will overwrite a previous session variable if the currentAbstractClient
contains already a session variable with the given key.- Parameter:
key
-value
-
-
asConcrete
- Gibt zurück:
- the current
AbstractClient
as 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 currentAbstractClient
is 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
AbstractClient
is connected.
-
runHere
Lets the currentAbstractClient
run the given command.- Parameter:
command
-
-
runOnCounterpart
Runs the given command on the counterpart of the currentAbstractClient
.- Parameter:
command
-- Löst aus:
UnconnectedArgumentException
- if the currentAbstractClient
is not connected.
-
runOnCounterpart
Runs the given commands on the counterpart of the currentAbstractClient
.- Parameter:
command
-commands
-- Löst aus:
UnconnectedArgumentException
- if the currentAbstractClient
is not connected.
-
runOnCounterpart
Runs the given commands on the counterpart of the currentAbstractClient
.- Parameter:
commands
-- Löst aus:
UnconnectedArgumentException
- if the currentAbstractClient
is not connected.
-