public abstract class ClientContext extends ApplicationContext
isExitOnClose| Constructor and Description |
|---|
ClientContext(ClientConfig cfg) |
ClientContext(ClientConfig cfg,
boolean isConnectOnInit) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelTask(RemoteTaskId taskId,
SessionId sessId)
Sends a
RemoteTaskCancelAgent in order to cancel the remote task on the server. |
boolean |
cancelTask(TaskId taskId)
Cancels the async task.
|
protected EspritClientConnector |
createClientConnector(ServerHost serverHost)
Creates the network connector for the given
ServerHost |
protected ClientInfo |
createClientInfo()
Creates the client specific
ClientInfo sub-type which contains client details info. |
protected abstract ServerNotificationHandler |
createServerNotificationHandler()
Creates the
ServerNotificationHandler instance used to handle received ServerNotificationMessages |
protected ClientTaskManager |
createTaskManager() |
ABOManager |
getABOManager() |
AdminActionValidator |
getAdminActionValidator() |
java.util.Map<AgentId,PropertyMap> |
getAgentParamsCache()
Returns a general purpose HashMap that can be used by agents for caching parameters
|
PowerMap |
getClientCache()
Returns a general purpose Map for caching client data
|
ClientConfig |
getClientConfig()
Returns the command line configuration parameters of the client
|
ClientConnector |
getClientConnector() |
ClientMainFrame |
getMainFrame()
Returns the MainFrame of the client application as the central access point to it's GUI.
|
ClientActionValidator |
getNetActionValidator() |
ServerNotificationHandler |
getServerMessageHandler()
Gets the clients handler for received ServerMessages
|
ClientTaskManager |
getTaskManager() |
UserActionValidator |
getUserActionValidator() |
UserCache |
getUserCache()
Returns the clients
UserCache, which keeps ever up-to-date session data
of all connected clients. |
void |
init()
Performs the initialization of this class.
|
boolean |
isCoClient()
Convenience method that tells whether this is an instance of
CoClientContext |
void |
loadTranslations(Language language)
Loads the translation tables for this context.
|
ClientInfo |
readClientInfo()
Creates and fills the client specific
ClientInfo object. |
void |
setMainFrame(ApplicationMainFrame mainFrame)
Sets the MainFrame for this application.
|
DumpString |
toDumpString(DumpString s)
This method allows subclasses to add values to the existing DumpString of the superclass.
|
ToString |
toString(ToString s)
This method allows subclasses to add values to the existing ToString of the superclass.
|
checkInitialized, close, confirmCancelAllAsyncActivity, createErrorHandler, createLicense, createUncaughtExceptionHandler, exit, getApplicationConfig, getApplicationName, getCustomVersion, getDatabase, getErrorHandler, getEspritVersion, getJavaVersionManager, getLicense, getSupportedLanguages, getTextEditor, hasMainFrame, isClosed, isDefaultContext, isGuiClient, isInitialized, registerForClose, setDatabase, setExitOnClose, showError, showError, showError, showInfo, showInfo, showWarning, showWarninggetLogChannel, getLogLevel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel, setLogLevelconfigureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toStringpublic ClientContext(ClientConfig cfg)
public ClientContext(ClientConfig cfg, boolean isConnectOnInit)
protected EspritClientConnector createClientConnector(ServerHost serverHost)
ServerHostpublic ClientConnector getClientConnector()
public ABOManager getABOManager()
public void init()
throws java.lang.Exception
Initializableinit in interface Initializableinit in class ApplicationContextjava.lang.Exceptionpublic void loadTranslations(Language language)
ApplicationContextloadTranslations in class ApplicationContextpublic UserCache getUserCache()
UserCache, which keeps ever up-to-date session data
of all connected clients.public UserActionValidator getUserActionValidator()
public ClientActionValidator getNetActionValidator()
public AdminActionValidator getAdminActionValidator()
public ClientTaskManager getTaskManager()
getTaskManager in class ApplicationContextpublic final boolean cancelTask(RemoteTaskId taskId, SessionId sessId)
RemoteTaskCancelAgent in order to cancel the remote task on the server.
The local counterpart task remains untouched but will react on the remote cancel.
Note that the SessionId is not necessarily the one of this client.
The cancel request may have been received via ClientCommand i.e. from
the servers administrator.public final boolean cancelTask(TaskId taskId)
ApplicationContextcancelTask in class ApplicationContextpublic ClientMainFrame getMainFrame()
getMainFrame in class ApplicationContextpublic void setMainFrame(ApplicationMainFrame mainFrame)
setMainFrame in class ApplicationContextpublic final boolean isCoClient()
CoClientContextpublic ServerNotificationHandler getServerMessageHandler()
public java.util.Map<AgentId,PropertyMap> getAgentParamsCache()
public PowerMap getClientCache()
public ClientConfig getClientConfig()
public final ClientInfo readClientInfo()
ClientInfo object.
Calls createClientInfo() for creating the eventual specific subclass
of ClientInfo.protected ClientTaskManager createTaskManager()
createTaskManager in class ApplicationContextprotected abstract ServerNotificationHandler createServerNotificationHandler()
ServerNotificationHandler instance used to handle received ServerNotificationMessagesprotected ClientInfo createClientInfo()
ClientInfo sub-type which contains client details info.
This method is called each time a ClientInfo object is requested from the server.
It is NOT called when the ClientContext is initialized.public ToString toString(ToString s)
DumpabletoString in interface DumpabletoString in class ApplicationContextpublic DumpString toDumpString(DumpString s)
DumpabletoDumpString in interface DumpabletoDumpString in class ApplicationContextCopyright © 2014 EsprIT-Systems. All Rights Reserved.