Interface BackendClient<C extends BackendClient<C,S>, S>
- Type Parameters:
C- the type of aBackendClientS- the type of the application service of the parent application of aBackendClient.
- All Superinterfaces:
AutoCloseable, Client, Closeable, GroupCloseable, OpennessRequestable, SecurityModeHolder
- All Known Implementing Classes:
AbstractBackendClient, AbstractWebClient, WebClient
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionintvoidvoidPops the currentSessionof the currentBackendClientfrom the currentBackendClientwith the given result.voidinternalPushSession(Session<C, S> session) Pushes the given session to the currentBackendClient.internalPushSessionAndGetResult(Session<C, S> session) Pushes the given session to the currentBackendClient.voidinternalSetNextSession(Session<C, S> session) Sets the nextSessionof the currentBackendClient.voidinternalSetParentApplication(Application<C, S> parentApplication) Sets the parentApplicationof the currentBackendClient.Methods inherited from interface Client
getTargetApplicationUrlName, hasTargetApplicationUrlName, internalSetEndPoint, isBackendClient, isFrontendClientMethods inherited from interface GroupCloseable
close, createCloseDependencyTo, getStoredCloseController, isClosed, noteCloseMethods inherited from interface OpennessRequestable
isOpenMethods inherited from interface SecurityModeHolder
getSecurityMode
-
Method Details
-
getApplicationAsTarget
IApplicationTarget getApplicationAsTarget()- Returns:
- the application of the current
BackendClientas target.
-
getSessionStackSize
int getSessionStackSize()- Returns:
- the size of the session stack of the current
BackendClient
-
getStoredApplicationService
S getStoredApplicationService()- Returns:
- the application service of the parent application of the current
BackendClient.
-
internalPopCurrentSession
void internalPopCurrentSession()Pops the currentSessionof the currentBackendClientfrom the currentBackendClient. Closes the currentBackendClientif the currentSessionof the currentBackendClientwas the lastSessionof the currentBackendClient.- Throws:
InvalidArgumentException- if the currentSessionof the currentBackendClientis not the topSessionof the currentBackendClient.
-
internalPopCurrentSessionWithResult
Pops the currentSessionof the currentBackendClientfrom the currentBackendClientwith the given result. Closes the currentBackendClientif the currentSessionof the currentBackendClientwas the lastSessionof the currentBackendClient.- Parameters:
result-- Throws:
InvalidArgumentException- if the currentSessionof the currentBackendClientis not the topSessionof the currentBackendClient
-
internalPushSession
Pushes the given session to the currentBackendClient.- Parameters:
session-- Throws:
RuntimeException- if the given session is null
-
internalPushSessionAndGetResult
Pushes the given session to the currentBackendClient.- Parameters:
session-- Returns:
- the result from the given session
- Throws:
RuntimeException- if the given session is null
-
internalSetNextSession
Sets the nextSessionof the currentBackendClient. The currentSessionof the currentBackendClientwill be popped from the currentBackendClientand the given session will be pushed to the currentBackendClient.- Parameters:
session-- Throws:
RuntimeException- if the given session is null
-
internalSetParentApplication
Sets the parentApplicationof the currentBackendClient.- Parameters:
parentApplication-- Throws:
RuntimeException- if the given parentApplication is nullRuntimeException- if the currentBackendClienthas already to a parentApplication
-