Package com.jk.core.context
Interface JKContext
- All Known Implementing Classes:
JKAbstractContext
,JKDesktopContext
,JKJsfContext
,JKMobileContext
,JKServletContext
,JKWebContext
public interface JKContext
This interface provides the necessary methods to manage and handle the
configuration properties for the context objects and their attributes.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
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
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
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
setPort
(int serverPort) This method sets the server port number to the specified value.void
setRemoteAppName
(String appName) This method sets the remote application name to the specified value.void
setTenantId
(String tenantId) This method sets the tenant identifier (ID) to the specified value.This method puts all this object attributes in a map.
-
Method Details
-
getRemotPort
int getRemotPort()This method gets the remote machine port number.- Returns:
- the remote machine port number.
-
getPort
int getPort()This method gets the server port number.- Returns:
- the server port number.
-
getRemoteMachineName
String getRemoteMachineName()This method gets the remote machine name.- Returns:
- a string representing the remote machine name.
-
getRemoteIP
String getRemoteIP()This method gets the remote machine IP Address.- Returns:
- the remote machine IP address.
-
getSessionID
String getSessionID()This method gets the current session identifier (ID)- Returns:
- the current session identifier (ID)
-
getConfigPath
String getConfigPath()This method gets the configuration file path for this object.- Returns:
- the configuration file path for this
JKContext
object.
-
getCurrentToken
String getCurrentToken()This method gets the current security token.- Returns:
- the current security token.
-
getAppName
String getAppName()This method gets the application name.- Returns:
- the application name
-
getProgram
String getProgram()This method gets the program.- Returns:
- a string representing the program.
-
getUserName
String getUserName()This method gets the user name.- Returns:
- string representing the user name.
-
getClientId
String getClientId()This method gets the client identifier (ID).- Returns:
- the client identifier (ID).
-
getModule
String getModule()This method gets the module.- Returns:
- string representing the module.
-
getAction
String getAction()This method gets the action.- Returns:
- string representing the action.
-
getRealIP
String getRealIP()This method gets the real IP address.- Returns:
- a string representing the real IP address.
-
getForwardHost
String getForwardHost()This method gets the forward host name.- Returns:
- the forward host name.
-
getForwardPort
String getForwardPort()This method gets the forward host server port.- Returns:
- a string representing the forward host server port.
-
getRole
String getRole()This method gets the context role.- Returns:
- a string representing the context role.
-
getRemoteUser
String getRemoteUser()This method gets the remote machine user.- Returns:
- the remote machine user.
-
getRemoteRole
String getRemoteRole()This method gets the remote machine user context role.- Returns:
- the remote machine user context role.
-
getTenantId
String getTenantId()This method gets the tenant identifier (ID).- Returns:
- the tenant identifier (ID).
-
getRemoteAppName
String getRemoteAppName()This method gets the remote application name.- Returns:
- the remote application name.
-
getHost
String getHost()This method gets the host name.- Returns:
- the host name.
-
getApplicationMap
This method gets the application map as aHashMap
.- Returns:
- a
HashMap
view of the application map.
-
getRequestMap
This method gets the request map as aHashMap
- Returns:
- a
HashMap
view of the request map.
-
getSessionMap
This method gets the current session map as aHashMap
.- Returns:
- a
HashMap
view of the current session map.
-
getHeadersMap
This method gets the headers map.- Returns:
- a
Map
view of the headers map.
-
getAttribute
This method gets the specified context attribute.- Parameters:
attribute
- Specifies the attribute name.- Returns:
- an object that represents the specified attribute.
-
getUser
Object getUser()This method gets the current user.- Returns:
- an object representing the current user.
-
getResourceLoader
JKResourceLoader getResourceLoader()This method gets the resource loader for this context object.- Returns:
- the resource loader for this
JKContext
object.
-
setAttribute
This method sets the specified value to the entry that is associated with the specified key in the map.- 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.- Parameters:
appName
- Specifies the new remote application name.
-
setPort
void setPort(int serverPort) This method sets the server port number to the specified value.- Parameters:
serverPort
- Specifies the new server port number.
-
setHost
This sets the host name to the specified value.- Parameters:
name
- Specifies the new host name.
-
setHeadersMap
This method replaces the headers map to the specified map.- Parameters:
headersMap
- Specifies the new headers map.
-
setTenantId
This method sets the tenant identifier (ID) to the specified value.- Parameters:
tenantId
- Specifies the new tenant identifier (ID).
-
toSimpleMap
This method puts all this object attributes in a map.- Returns:
- a
Map
view of the object attributes.
-