Package com.jk.core.context
Class JKAbstractContext
java.lang.Object
com.jk.core.context.JKAbstractContext
- All Implemented Interfaces:
JKContext
- Direct Known Subclasses:
JKDesktopContext
,JKMobileContext
,JKServletContext
,JKWebContext
The Class JKAbstractContext.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the action.Gets the application map.Gets the app name.getAttribute
(String attribute) Gets the attribute.Gets the client id.Gets the config path.Gets the current token.Gets the forward host.Gets the forward port.Gets the headers map.getHost()
Gets the host.Gets the module.int
getPort()
Gets the port.Gets the program.Gets the real IP.Gets the remote app name.Gets the remote IP.Gets the machine name.Gets the remote role.Gets the user name.int
Gets the remot port.Gets the request map.Gets the resource loader.getRole()
Gets the role.Gets the session ID.Gets the session map.getUser()
Gets the user.Gets the user name.void
Sets the action.void
setApplicationMap
(Map<String, Object> applicationMap) Sets the application map.void
setAppName
(String appName) Sets the app name.void
setAttribute
(String key, Object value) Sets the attribute.void
setClientId
(String clientId) Sets the client id.void
setConfigPath
(String configPath) Sets the config path.void
setCurrentToken
(String token) Sets the current token.void
setHeadersMap
(Map<String, String> headersMap) Sets the headers map.void
Sets the host.void
Sets the module.void
setPort
(int serverPort) Sets the port.void
setProgram
(String program) Sets the program.void
setRemoteAppName
(String appName) Sets the remote app name.void
setRemoteIP
(String remoteIP) Sets the remote IP.void
setRemoteMachineName
(String machineName) Sets the machine name.void
setRemoteRole
(String role) Sets the remote role.void
setRemoteUser
(String userName) Sets the user name.void
setRemotPort
(int remotPort) Sets the remot port.void
setRequestMap
(Map<String, Object> requestMap) Sets the request map.void
Sets the role.void
setSessionID
(String sessionID) Sets the session ID.void
setSessionMap
(Map<String, Object> sessionMap) Sets the session map.void
Sets the user.void
setUserName
(String userName) Sets the user name.To simple map.toString()
To string.
-
Constructor Details
-
JKAbstractContext
public JKAbstractContext()
-
-
Method Details
-
getApplicationMap
Gets the application map.- Specified by:
getApplicationMap
in interfaceJKContext
- Returns:
- the application map
-
getAttribute
Gets the attribute.- Specified by:
getAttribute
in interfaceJKContext
- Parameters:
attribute
- the attribute- Returns:
- the attribute
-
getRemoteMachineName
Gets the machine name.- Specified by:
getRemoteMachineName
in interfaceJKContext
- Returns:
- the machine name
-
getRemoteIP
Gets the remote IP.- Specified by:
getRemoteIP
in interfaceJKContext
- Returns:
- the remote IP
-
getRemotPort
public int getRemotPort()Gets the remot port.- Specified by:
getRemotPort
in interfaceJKContext
- Returns:
- the remot port
-
getRequestMap
Gets the request map.- Specified by:
getRequestMap
in interfaceJKContext
- Returns:
- the request map
-
getSessionID
Gets the session ID.- Specified by:
getSessionID
in interfaceJKContext
- Returns:
- the session ID
-
getSessionMap
Gets the session map.- Specified by:
getSessionMap
in interfaceJKContext
- Returns:
- the session map
-
getUser
Gets the user. -
setAttribute
Sets the attribute.- Specified by:
setAttribute
in interfaceJKContext
- Parameters:
key
- the keyvalue
- the value
-
setApplicationMap
Sets the application map.- Parameters:
applicationMap
- the application map
-
setRemoteMachineName
Sets the machine name.- Parameters:
machineName
- the new machine name
-
setRemoteIP
Sets the remote IP.- Parameters:
remoteIP
- the new remote IP
-
setRemotPort
public void setRemotPort(int remotPort) Sets the remot port.- Parameters:
remotPort
- the new remot port
-
setRequestMap
Sets the request map.- Parameters:
requestMap
- the request map
-
setSessionID
Sets the session ID.- Parameters:
sessionID
- the new session ID
-
setSessionMap
Sets the session map.- Parameters:
sessionMap
- the session map
-
setUser
Sets the user.- Parameters:
user
- the new user
-
getResourceLoader
Gets the resource loader.- Specified by:
getResourceLoader
in interfaceJKContext
- Returns:
- the resource loader
-
getConfigPath
Gets the config path.- Specified by:
getConfigPath
in interfaceJKContext
- Returns:
- the config path
-
setConfigPath
Sets the config path.- Parameters:
configPath
- the new config path
-
getCurrentToken
Gets the current token.- Specified by:
getCurrentToken
in interfaceJKContext
- Returns:
- the current token
-
setCurrentToken
Sets the current token.- Parameters:
token
- the new current token
-
setRemoteAppName
Sets the remote app name.- Specified by:
setRemoteAppName
in interfaceJKContext
- Parameters:
appName
- the new remote app name
-
getRemoteAppName
Gets the remote app name.- Specified by:
getRemoteAppName
in interfaceJKContext
- Returns:
- the remote app name
-
setProgram
Sets the program.- Parameters:
program
- the new program
-
getProgram
Gets the program.- Specified by:
getProgram
in interfaceJKContext
- Returns:
- the program
-
setUserName
Sets the user name.- Parameters:
userName
- the new user name
-
getUserName
Gets the user name.- Specified by:
getUserName
in interfaceJKContext
- Returns:
- the user name
-
setClientId
Sets the client id.- Parameters:
clientId
- the new client id
-
getClientId
Gets the client id.- Specified by:
getClientId
in interfaceJKContext
- Returns:
- the client id
-
setModule
Sets the module.- Parameters:
module
- the new module
-
getModule
Gets the module. -
setAction
Sets the action.- Parameters:
action
- the new action
-
getAction
Gets the action. -
setAppName
Sets the app name.- Parameters:
appName
- the new app name
-
getAppName
Gets the app name.- Specified by:
getAppName
in interfaceJKContext
- Returns:
- the app name
-
setPort
public void setPort(int serverPort) Sets the port. -
getPort
public int getPort()Gets the port. -
setHost
Sets the host. -
getHost
Gets the host. -
setHeadersMap
Sets the headers map.- Specified by:
setHeadersMap
in interfaceJKContext
- Parameters:
headersMap
- the headers map
-
getHeadersMap
Gets the headers map.- Specified by:
getHeadersMap
in interfaceJKContext
- Returns:
- the headers map
-
getRealIP
Gets the real IP. -
getForwardPort
Gets the forward port.- Specified by:
getForwardPort
in interfaceJKContext
- Returns:
- the forward port
-
getForwardHost
Gets the forward host.- Specified by:
getForwardHost
in interfaceJKContext
- Returns:
- the forward host
-
getRole
Gets the role. -
setRole
Sets the role.- Parameters:
role
- the new role
-
toString
To string. -
toSimpleMap
To simple map.- Specified by:
toSimpleMap
in interfaceJKContext
- Returns:
- the map
-
setRemoteUser
Sets the user name.- Parameters:
userName
- the new user name
-
getRemoteUser
Gets the user name.- Specified by:
getRemoteUser
in interfaceJKContext
- Returns:
- the user name
-
setRemoteRole
Sets the remote role.- Parameters:
role
- the new remote role
-
getRemoteRole
Gets the remote role.- Specified by:
getRemoteRole
in interfaceJKContext
- Returns:
- the remote role
-