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 ServerNotificationMessage s |
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, showWarning
getLogChannel, getLogLevel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel, setLogLevel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString
public ClientContext(ClientConfig cfg)
public ClientContext(ClientConfig cfg, boolean isConnectOnInit)
protected EspritClientConnector createClientConnector(ServerHost serverHost)
ServerHost
public ClientConnector getClientConnector()
public ABOManager getABOManager()
public void init() throws java.lang.Exception
Initializable
init
in interface Initializable
init
in class ApplicationContext
java.lang.Exception
public void loadTranslations(Language language)
ApplicationContext
loadTranslations
in class ApplicationContext
public 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 ApplicationContext
public 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)
ApplicationContext
cancelTask
in class ApplicationContext
public ClientMainFrame getMainFrame()
getMainFrame
in class ApplicationContext
public void setMainFrame(ApplicationMainFrame mainFrame)
setMainFrame
in class ApplicationContext
public final boolean isCoClient()
CoClientContext
public 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 ApplicationContext
protected abstract ServerNotificationHandler createServerNotificationHandler()
ServerNotificationHandler
instance used to handle received ServerNotificationMessage
sprotected 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)
Dumpable
toString
in interface Dumpable
toString
in class ApplicationContext
public DumpString toDumpString(DumpString s)
Dumpable
toDumpString
in interface Dumpable
toDumpString
in class ApplicationContext
Copyright © 2014 EsprIT-Systems. All Rights Reserved.