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 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

      HashMap<String,Object> getApplicationMap()
      This method gets the application map as a HashMap.
      Returns:
      a HashMap view of the application map.
    • getRequestMap

      HashMap<String,Object> getRequestMap()
      This method gets the request map as a HashMap
      Returns:
      a HashMap view of the request map.
    • getSessionMap

      HashMap<String,Object> getSessionMap()
      This method gets the current session map as a HashMap.
      Returns:
      a HashMap view of the current session map.
    • getHeadersMap

      Map<String,String> getHeadersMap()
      This method gets the headers map.
      Returns:
      a Map view of the headers map.
    • getAttribute

      Object getAttribute(String attribute)
      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

      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.
      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

      void setRemoteAppName(String appName)
      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

      void setHost(String name)
      This sets the host name to the specified value.
      Parameters:
      name - Specifies the new host name.
    • setHeadersMap

      void setHeadersMap(Map<String,String> headersMap)
      This method replaces the headers map to the specified map.
      Parameters:
      headersMap - Specifies the new headers map.
    • setTenantId

      void setTenantId(String tenantId)
      This method sets the tenant identifier (ID) to the specified value.
      Parameters:
      tenantId - Specifies the new tenant identifier (ID).
    • toSimpleMap

      Map<String,Object> toSimpleMap()
      This method puts all this object attributes in a map.
      Returns:
      a Map view of the object attributes.