Class AbstractBackendClient<C extends AbstractBackendClient<C,S>, S>
java.lang.Object
ch.nolix.base.net.clientserver.AbstractClient
ch.nolix.base.net.clientserver.AbstractBackendClient<C,S>
- Type Parameters:
C- the type of aAbstractBackendClient.S- the type of the application service of theApplicationof aAbstractBackendClient.
- All Implemented Interfaces:
BackendClient<C,S>, Client, SecurityModeHolder, Closeable, GroupCloseable, OpennessRequestable, AutoCloseable
- Direct Known Subclasses:
AbstractWebClient
public abstract class AbstractBackendClient<C extends AbstractBackendClient<C,S>, S>
extends AbstractClient
implements BackendClient<C,S>
- Author:
- Silvan Wyss
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IApplicationTargetfinal Stringfinal intfinal Sfinal voidfinal voidPops the currentSessionof the currentBackendClientfrom the currentBackendClientwith the given result.final voidinternalPushSession(Session<C, S> session) Pushes the given session to the currentBackendClient.final ObjectinternalPushSessionAndGetResult(Session<C, S> session) Pushes the given session to the currentBackendClient.final voidinternalSetNextSession(Session<C, S> session) Sets the nextSessionof the currentBackendClient.final voidinternalSetParentApplication(Application<C, S> parentApplication) Sets the parentApplicationof the currentBackendClient.final booleanfinal booleanfinal voidLets the currentGroupCloseablenote a close.Methods inherited from class AbstractClient
getSecurityMode, getStoredCloseController, getTargetApplicationUrlName, hasTargetApplicationUrlName, internalSetEndPoint, isClosedMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Client
getTargetApplicationUrlName, hasTargetApplicationUrlName, internalSetEndPointMethods inherited from interface GroupCloseable
close, createCloseDependencyTo, getStoredCloseController, isClosedMethods inherited from interface OpennessRequestable
isOpenMethods inherited from interface SecurityModeHolder
getSecurityMode
-
Constructor Details
-
AbstractBackendClient
public AbstractBackendClient()
-
-
Method Details
-
getApplicationName
- Returns:
- the name of the parent
AbstractApplicationof the currentAbstractBackendClient.
-
getApplicationAsTarget
- Specified by:
getApplicationAsTargetin interfaceBackendClient<C extends AbstractBackendClient<C,S>, S> - Returns:
- the application of the current
BackendClientas target.
-
getSessionStackSize
public final int getSessionStackSize()- Specified by:
getSessionStackSizein interfaceBackendClient<C extends AbstractBackendClient<C,S>, S> - Returns:
- the size of the session stack of the current
BackendClient
-
getStoredApplicationService
- Specified by:
getStoredApplicationServicein interfaceBackendClient<C extends AbstractBackendClient<C,S>, S> - Returns:
- the application service of the parent application of the current
BackendClient.
-
internalPopCurrentSession
public final void internalPopCurrentSession()Pops the currentSessionof the currentBackendClientfrom the currentBackendClient. Closes the currentBackendClientif the currentSessionof the currentBackendClientwas the lastSessionof the currentBackendClient.- Specified by:
internalPopCurrentSessionin interfaceBackendClient<C extends AbstractBackendClient<C,S>, S>
-
internalPopCurrentSessionWithResult
Pops the currentSessionof the currentBackendClientfrom the currentBackendClientwith the given result. Closes the currentBackendClientif the currentSessionof the currentBackendClientwas the lastSessionof the currentBackendClient.- Specified by:
internalPopCurrentSessionWithResultin interfaceBackendClient<C extends AbstractBackendClient<C,S>, S> - Parameters:
result-
-
internalPushSession
Pushes the given session to the currentBackendClient.- Specified by:
internalPushSessionin interfaceBackendClient<C extends AbstractBackendClient<C,S>, S> - Parameters:
session-
-
internalPushSessionAndGetResult
Pushes the given session to the currentBackendClient.- Specified by:
internalPushSessionAndGetResultin interfaceBackendClient<C extends AbstractBackendClient<C,S>, S> - Parameters:
session-- Returns:
- the result from the given session
-
internalSetNextSession
Sets the nextSessionof the currentBackendClient. The currentSessionof the currentBackendClientwill be popped from the currentBackendClientand the given session will be pushed to the currentBackendClient.- Specified by:
internalSetNextSessionin interfaceBackendClient<C extends AbstractBackendClient<C,S>, S> - Parameters:
session-
-
internalSetParentApplication
Sets the parentApplicationof the currentBackendClient.- Specified by:
internalSetParentApplicationin interfaceBackendClient<C extends AbstractBackendClient<C,S>, S> - Parameters:
parentApplication-
-
isBackendClient
public final boolean isBackendClient()- Specified by:
isBackendClientin interfaceClient- Returns:
- true if the current
Clientis a back-end client, false otherwise
-
isFrontendClient
public final boolean isFrontendClient()- Specified by:
isFrontendClientin interfaceClient- Returns:
- true if the current
Clientis a front-end client, false otherwise
-
noteClose
public final void noteClose()Lets the currentGroupCloseablenote a close.- Specified by:
noteClosein interfaceGroupCloseable
-