Klasse Client<C extends Client<C>>

java.lang.Object
ch.nolix.system.application.main.Client<C>
Typparameter:
C - is the type of a Client.
Alle implementierten Schnittstellen:
Closeable, CloseStateRequestable, GroupCloseable, AutoCloseable
Bekannte direkte Unterklassen:
BackendClient, FrontendClient

public abstract class Client<C extends Client<C>> extends Object implements GroupCloseable
A Client is an end point with comfortable functionalities.
Version:
2016-01-01
Autor:
Silvan Wyss
  • Konstruktordetails

    • Client

      public Client()
  • Methodendetails

    • containsSessionVariableWithKey

      public final boolean containsSessionVariableWithKey(String key)
      Parameter:
      key -
      Gibt zurück:
      true if the current Client contains a session variable with the given key, false otherwise.
    • getStoredCloseController

      public final CloseController getStoredCloseController()
      Angegeben von:
      getStoredCloseController in Schnittstelle GroupCloseable
      Gibt zurück:
      the ICloseController of the current GroupCloseable.
    • getConnectionSecurityLevel

      public SecurityMode getConnectionSecurityLevel()
      Gibt zurück:
      the SecurityMode of the connection of the current Client.
    • getSessionVariableValueByKey

      public final String getSessionVariableValueByKey(String key)
      Parameter:
      key -
      Gibt zurück:
      the value of the session variable with the given key from the current Client.
      Löst aus:
      ArgumentDoesNotContainElementException - if the current Client does not contain a session variable with the given key.
    • getTarget

      public final String getTarget()
      Gibt zurück:
      the name of the target Application of the current Client.
    • hasRequestedConnection

      public final boolean hasRequestedConnection()
      Gibt zurück:
      true if the current Client has requested the connection.
    • hasTarget

      public final boolean hasTarget()
      Gibt zurück:
      true if the current Client has a target.
    • isBackendClient

      public abstract boolean isBackendClient()
      Gibt zurück:
      true if the current Client is a backend Client.
    • isClosed

      public final boolean isClosed()
      Angegeben von:
      isClosed in Schnittstelle CloseStateRequestable
      Angegeben von:
      isClosed in Schnittstelle GroupCloseable
      Gibt zurück:
      true if the current CloseStateRequestable is closed.
    • isFrontendClient

      public abstract boolean isFrontendClient()
      Gibt zurück:
      true if the current Client is a frontend Client.
    • isLocalClient

      public final boolean isLocalClient()
      Gibt zurück:
      true if the current Client is a local Client.
    • isNetClient

      public final boolean isNetClient()
      Gibt zurück:
      true if the current Client is a net Client.
    • isWebClient

      public final boolean isWebClient()
      Gibt zurück:
      true if the current Client is a web Client.
      Löst aus:
      UnconnectedArgumentException - if the current Client is not connected.
    • setSessionVariableWithKeyAndValue

      public final void setSessionVariableWithKeyAndValue(String key, String value)
      Sets a session variable with the given key and value to the current Client. Will overwrite a previous session variable if the current Client contains already a session variable with the given key.
      Parameter:
      key -
      value -
    • asConcrete

      protected final C asConcrete()
      Gibt zurück:
      the current Client as concrete Client.
    • getDataFromCounterpart

      protected final INode<?> getDataFromCounterpart(IChainedNode request)
      Parameter:
      request -
      Gibt zurück:
      the data the given request requests from the counterpart of the current Client.
      Löst aus:
      UnconnectedArgumentException - if the current Client is not connected.
    • getDataFromHere

      protected abstract INode<?> getDataFromHere(IChainedNode request)
      Parameter:
      request -
      Gibt zurück:
      the data the given request requests from the current Client.
    • isConnected

      protected final boolean isConnected()
      Gibt zurück:
      true if the current Client is connected.
    • runHere

      protected abstract void runHere(IChainedNode command)
      Lets the current Client run the given command.
      Parameter:
      command -
    • runOnCounterpart

      protected final void runOnCounterpart(IChainedNode command)
      Runs the given command on the counterpart of the current Client.
      Parameter:
      command -
      Löst aus:
      UnconnectedArgumentException - if the current Client is not connected.
    • runOnCounterpart

      protected final void runOnCounterpart(ChainedNode command, ChainedNode... commands)
      Runs the given commands on the counterpart of the current Client.
      Parameter:
      command -
      commands -
      Löst aus:
      UnconnectedArgumentException - if the current Client is not connected.
    • runOnCounterpart

      protected final void runOnCounterpart(Iterable<? extends IChainedNode> commands)
      Runs the given commands on the counterpart of the current Client.
      Parameter:
      commands -
      Löst aus:
      UnconnectedArgumentException - if the current Client is not connected.