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
This class implements the
JKContext
interface.- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method gets the action.This method gets the application map as aHashMap
.This method gets the application name.getAttribute
(String attribute) This method gets the specified context attribute.This method gets the client identifier (ID).This method gets the configuration file path for this object.This method gets the current security token.This method gets the forward host name.This method gets the forward host server port.This method gets the headers map.getHost()
This method gets the host name.This method gets the module.int
getPort()
This method gets the server port number.This method gets the program.This method gets the real IP address.This method gets the remote application name.This method gets the remote machine IP Address.This method gets the remote machine name.This method gets the remote machine user context role.This method gets the remote machine user.int
This method gets the remote machine port number.This method gets the request map as aHashMap
This method gets the resource loader for this context object.getRole()
This method gets the context role.This method gets the current session identifier (ID)This method gets the current session map as aHashMap
.This method gets the tenant identifier (ID).getUser()
This method gets the current user.This method gets the user name.void
This method sets the action to the specified value.void
setApplicationMap
(Map<String, Object> applicationMap) This method replaces the application map with the specified map.void
setAppName
(String appName) This method sets the application name to the specified value.void
setAttribute
(String key, Object value) This method sets the specified value to the entry that is associated with the specified key in the map.void
setClientId
(String clientId) This method sets the client identifier (ID) to the specified value.void
setConfigPath
(String configPath) This method sets the configuration file path to the specified value.void
setCurrentToken
(String token) This method sets the current security token to the specified value.void
setHeadersMap
(Map<String, String> headersMap) This method replaces the headers map to the specified map.void
This sets the host name to the specified value.void
This method sets the module to the specified value.void
setPort
(int serverPort) This method sets the server port number to the specified value.void
setProgram
(String program) This method sets the program to the specifies value.void
setRemoteAppName
(String appName) This method sets the remote application name to the specified value.void
setRemoteIP
(String remoteIP) This method sets the remote IP address to the specified value.void
setRemoteMachineName
(String machineName) This method sets the machine name to the specified value.void
setRemoteRole
(String role) This method sets the remote context role to the specified value.void
setRemoteUser
(String userName) This method sets the user name to the specified value.void
setRemotPort
(int remotPort) This method sets the remote server port number to the specifies value.void
setRequestMap
(Map<String, Object> requestMap) This method replaces the request map with the specified map.void
This method sets the context role to the specified value.void
setSessionID
(String sessionID) This method sets the current session identifier (ID) to the specified value.void
setSessionMap
(Map<String, Object> sessionMap) This method replaces the session map with the specified map.void
setTenantId
(String tenantId) This method sets the tenant identifier (ID) to the specified value.void
This method replaces the user object with the specified object.void
setUserName
(String userName) This method sets the user name to the specified value.This method puts all this object attributes in a map.toString()
Returns a string representation of the object.
-
Constructor Details
-
JKAbstractContext
public JKAbstractContext()
-
-
Method Details
-
getRemotPort
public int getRemotPort()This method gets the remote machine port number.- Specified by:
getRemotPort
in interfaceJKContext
- Returns:
- the remote machine port number.
-
getPort
public int getPort()This method gets the server port number. -
getRemoteMachineName
This method gets the remote machine name.- Specified by:
getRemoteMachineName
in interfaceJKContext
- Returns:
- a string representing the remote machine name.
-
getRemoteIP
This method gets the remote machine IP Address.- Specified by:
getRemoteIP
in interfaceJKContext
- Returns:
- the remote machine IP address.
-
getSessionID
This method gets the current session identifier (ID)- Specified by:
getSessionID
in interfaceJKContext
- Returns:
- the current session identifier (ID)
-
getConfigPath
This method gets the configuration file path for this object.- Specified by:
getConfigPath
in interfaceJKContext
- Returns:
- the configuration file path for this
JKContext
object.
-
getCurrentToken
This method gets the current security token.- Specified by:
getCurrentToken
in interfaceJKContext
- Returns:
- the current security token.
-
getRemoteAppName
This method gets the remote application name.- Specified by:
getRemoteAppName
in interfaceJKContext
- Returns:
- the remote application name.
-
getProgram
This method gets the program.- Specified by:
getProgram
in interfaceJKContext
- Returns:
- a string representing the program.
-
getUserName
This method gets the user name.- Specified by:
getUserName
in interfaceJKContext
- Returns:
- string representing the user name.
-
getClientId
This method gets the client identifier (ID).- Specified by:
getClientId
in interfaceJKContext
- Returns:
- the client identifier (ID).
-
getModule
This method gets the module. -
getAction
This method gets the action. -
getAppName
This method gets the application name.- Specified by:
getAppName
in interfaceJKContext
- Returns:
- the application name
-
getHost
This method gets the host name. -
getRealIP
This method gets the real IP address. -
getForwardPort
This method gets the forward host server port.- Specified by:
getForwardPort
in interfaceJKContext
- Returns:
- a string representing the forward host server port.
-
getForwardHost
This method gets the forward host name.- Specified by:
getForwardHost
in interfaceJKContext
- Returns:
- the forward host name.
-
getRole
This method gets the context role. -
toString
Returns a string representation of the object. -
getRemoteUser
This method gets the remote machine user.- Specified by:
getRemoteUser
in interfaceJKContext
- Returns:
- the remote machine user.
-
getRemoteRole
This method gets the remote machine user context role.- Specified by:
getRemoteRole
in interfaceJKContext
- Returns:
- the remote machine user context role.
-
getTenantId
This method gets the tenant identifier (ID).- Specified by:
getTenantId
in interfaceJKContext
- Returns:
- the tenant identifier (ID).
-
getApplicationMap
This method gets the application map as aHashMap
.- Specified by:
getApplicationMap
in interfaceJKContext
- Returns:
- a
HashMap
view of the application map.
-
getRequestMap
This method gets the request map as aHashMap
- Specified by:
getRequestMap
in interfaceJKContext
- Returns:
- a
HashMap
view of the request map.
-
getSessionMap
This method gets the current session map as aHashMap
.- Specified by:
getSessionMap
in interfaceJKContext
- Returns:
- a
HashMap
view of the current session map.
-
getHeadersMap
This method gets the headers map.- Specified by:
getHeadersMap
in interfaceJKContext
- Returns:
- a
Map
view of the headers map.
-
getAttribute
This method gets the specified context attribute.- Specified by:
getAttribute
in interfaceJKContext
- Parameters:
attribute
- Specifies the attribute name.- Returns:
- an object that represents the specified attribute.
-
getUser
This method gets the current user. -
getResourceLoader
This method gets the resource loader for this context object.- Specified by:
getResourceLoader
in interfaceJKContext
- Returns:
- the resource loader for this
JKContext
object.
-
setApplicationMap
This method replaces the application map with the specified map.- Parameters:
applicationMap
- Specifies the new application map.
-
setRemoteMachineName
This method sets the machine name to the specified value.- Parameters:
machineName
- Specifies the new machine name.
-
setRemoteIP
This method sets the remote IP address to the specified value.- Parameters:
remoteIP
- Specifies the new remote IP address.
-
setRemotPort
public void setRemotPort(int remotPort) This method sets the remote server port number to the specifies value.- Parameters:
remotPort
- Specifies the new remote server port number.
-
setRequestMap
This method replaces the request map with the specified map.- Parameters:
requestMap
- Specifies the new request map.
-
setSessionID
This method sets the current session identifier (ID) to the specified value.- Parameters:
sessionID
- Specifies the new current session identifier (ID).
-
setSessionMap
This method replaces the session map with the specified map.- Parameters:
sessionMap
- Specifies the new session map.
-
setUser
This method replaces the user object with the specified object.- Parameters:
user
- Specifies the new user object.
-
setConfigPath
This method sets the configuration file path to the specified value.- Parameters:
configPath
- Specifies the new configuration file path.
-
setCurrentToken
This method sets the current security token to the specified value.- Parameters:
token
- Specifies the new current security token.
-
setUserName
This method sets the user name to the specified value.- Parameters:
userName
- Specifies the new user name.
-
setProgram
This method sets the program to the specifies value.- Parameters:
program
- Specifies the new program.
-
setClientId
This method sets the client identifier (ID) to the specified value.- Parameters:
clientId
- Specifies the new client identifier (ID).
-
setModule
This method sets the module to the specified value.- Parameters:
module
- Specifies the new module.
-
setAction
This method sets the action to the specified value.- Parameters:
action
- Specifies the new action.
-
setAppName
This method sets the application name to the specified value.- Parameters:
appName
- Specifies the new application name.
-
setRemoteUser
This method sets the user name to the specified value.- Parameters:
userName
- Specifies the new user name.
-
setRole
This method sets the context role to the specified value.- Parameters:
role
- Specifies the new context role.
-
setRemoteRole
This method sets the remote context role to the specified value.- Parameters:
role
- Specifies the new remote context role.
-
setAttribute
This method sets the specified value to the entry that is associated with the specified key in the map.- Specified by:
setAttribute
in interfaceJKContext
- Parameters:
key
- Specifies the key associated with the value to be added.value
- Specifies the new value to the entry associated with the specified key.
-
setRemoteAppName
This method sets the remote application name to the specified value.- Specified by:
setRemoteAppName
in interfaceJKContext
- Parameters:
appName
- Specifies the new remote application name.
-
setPort
public void setPort(int serverPort) This method sets the server port number to the specified value. -
setHost
This sets the host name to the specified value. -
setHeadersMap
This method replaces the headers map to the specified map.- Specified by:
setHeadersMap
in interfaceJKContext
- Parameters:
headersMap
- Specifies the new headers map.
-
setTenantId
This method sets the tenant identifier (ID) to the specified value.- Specified by:
setTenantId
in interfaceJKContext
- Parameters:
tenantId
- Specifies the new tenant identifier (ID).
-
toSimpleMap
This method puts all this object attributes in a map.- Specified by:
toSimpleMap
in interfaceJKContext
- Returns:
- a
Map
view of the object attributes.
-