Class JKAbstractContext

java.lang.Object
com.jk.core.context.JKAbstractContext
All Implemented Interfaces:
JKContext
Direct Known Subclasses:
JKDesktopContext, JKMobileContext, JKServletContext, JKWebContext

public abstract class JKAbstractContext extends Object implements JKContext
The Class JKAbstractContext.
  • Constructor Details

    • JKAbstractContext

      public JKAbstractContext()
  • Method Details

    • getApplicationMap

      public HashMap<String,Object> getApplicationMap()
      Gets the application map.
      Specified by:
      getApplicationMap in interface JKContext
      Returns:
      the application map
    • getAttribute

      public Object getAttribute(String attribute)
      Gets the attribute.
      Specified by:
      getAttribute in interface JKContext
      Parameters:
      attribute - the attribute
      Returns:
      the attribute
    • getRemoteMachineName

      public String getRemoteMachineName()
      Gets the machine name.
      Specified by:
      getRemoteMachineName in interface JKContext
      Returns:
      the machine name
    • getRemoteIP

      public String getRemoteIP()
      Gets the remote IP.
      Specified by:
      getRemoteIP in interface JKContext
      Returns:
      the remote IP
    • getRemotPort

      public int getRemotPort()
      Gets the remot port.
      Specified by:
      getRemotPort in interface JKContext
      Returns:
      the remot port
    • getRequestMap

      public HashMap<String,Object> getRequestMap()
      Gets the request map.
      Specified by:
      getRequestMap in interface JKContext
      Returns:
      the request map
    • getSessionID

      public String getSessionID()
      Gets the session ID.
      Specified by:
      getSessionID in interface JKContext
      Returns:
      the session ID
    • getSessionMap

      public HashMap<String,Object> getSessionMap()
      Gets the session map.
      Specified by:
      getSessionMap in interface JKContext
      Returns:
      the session map
    • getUser

      public Object getUser()
      Gets the user.
      Specified by:
      getUser in interface JKContext
      Returns:
      the user
    • setAttribute

      public void setAttribute(String key, Object value)
      Sets the attribute.
      Specified by:
      setAttribute in interface JKContext
      Parameters:
      key - the key
      value - the value
    • setApplicationMap

      public void setApplicationMap(Map<String,Object> applicationMap)
      Sets the application map.
      Parameters:
      applicationMap - the application map
    • setRemoteMachineName

      public void setRemoteMachineName(String machineName)
      Sets the machine name.
      Parameters:
      machineName - the new machine name
    • setRemoteIP

      public void setRemoteIP(String remoteIP)
      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

      public void setRequestMap(Map<String,Object> requestMap)
      Sets the request map.
      Parameters:
      requestMap - the request map
    • setSessionID

      public void setSessionID(String sessionID)
      Sets the session ID.
      Parameters:
      sessionID - the new session ID
    • setSessionMap

      public void setSessionMap(Map<String,Object> sessionMap)
      Sets the session map.
      Parameters:
      sessionMap - the session map
    • setUser

      public void setUser(Object user)
      Sets the user.
      Parameters:
      user - the new user
    • getResourceLoader

      public JKResourceLoader getResourceLoader()
      Gets the resource loader.
      Specified by:
      getResourceLoader in interface JKContext
      Returns:
      the resource loader
    • getConfigPath

      public String getConfigPath()
      Gets the config path.
      Specified by:
      getConfigPath in interface JKContext
      Returns:
      the config path
    • setConfigPath

      public void setConfigPath(String configPath)
      Sets the config path.
      Parameters:
      configPath - the new config path
    • getCurrentToken

      public String getCurrentToken()
      Gets the current token.
      Specified by:
      getCurrentToken in interface JKContext
      Returns:
      the current token
    • setCurrentToken

      public void setCurrentToken(String token)
      Sets the current token.
      Parameters:
      token - the new current token
    • setRemoteAppName

      public void setRemoteAppName(String appName)
      Sets the remote app name.
      Specified by:
      setRemoteAppName in interface JKContext
      Parameters:
      appName - the new remote app name
    • getRemoteAppName

      public String getRemoteAppName()
      Gets the remote app name.
      Specified by:
      getRemoteAppName in interface JKContext
      Returns:
      the remote app name
    • setProgram

      public void setProgram(String program)
      Sets the program.
      Parameters:
      program - the new program
    • getProgram

      public String getProgram()
      Gets the program.
      Specified by:
      getProgram in interface JKContext
      Returns:
      the program
    • setUserName

      public void setUserName(String userName)
      Sets the user name.
      Parameters:
      userName - the new user name
    • getUserName

      public String getUserName()
      Gets the user name.
      Specified by:
      getUserName in interface JKContext
      Returns:
      the user name
    • setClientId

      public void setClientId(String clientId)
      Sets the client id.
      Parameters:
      clientId - the new client id
    • getClientId

      public String getClientId()
      Gets the client id.
      Specified by:
      getClientId in interface JKContext
      Returns:
      the client id
    • setModule

      public void setModule(String module)
      Sets the module.
      Parameters:
      module - the new module
    • getModule

      public String getModule()
      Gets the module.
      Specified by:
      getModule in interface JKContext
      Returns:
      the module
    • setAction

      public void setAction(String action)
      Sets the action.
      Parameters:
      action - the new action
    • getAction

      public String getAction()
      Gets the action.
      Specified by:
      getAction in interface JKContext
      Returns:
      the action
    • setAppName

      public void setAppName(String appName)
      Sets the app name.
      Parameters:
      appName - the new app name
    • getAppName

      public String getAppName()
      Gets the app name.
      Specified by:
      getAppName in interface JKContext
      Returns:
      the app name
    • setPort

      public void setPort(int serverPort)
      Sets the port.
      Specified by:
      setPort in interface JKContext
      Parameters:
      serverPort - the new port
    • getPort

      public int getPort()
      Gets the port.
      Specified by:
      getPort in interface JKContext
      Returns:
      the port
    • setHost

      public void setHost(String name)
      Sets the host.
      Specified by:
      setHost in interface JKContext
      Parameters:
      name - the new host
    • getHost

      public String getHost()
      Gets the host.
      Specified by:
      getHost in interface JKContext
      Returns:
      the host
    • setHeadersMap

      public void setHeadersMap(Map<String,String> headersMap)
      Sets the headers map.
      Specified by:
      setHeadersMap in interface JKContext
      Parameters:
      headersMap - the headers map
    • getHeadersMap

      public Map<String,String> getHeadersMap()
      Gets the headers map.
      Specified by:
      getHeadersMap in interface JKContext
      Returns:
      the headers map
    • getRealIP

      public String getRealIP()
      Gets the real IP.
      Specified by:
      getRealIP in interface JKContext
      Returns:
      the real IP
    • getForwardPort

      public String getForwardPort()
      Gets the forward port.
      Specified by:
      getForwardPort in interface JKContext
      Returns:
      the forward port
    • getForwardHost

      public String getForwardHost()
      Gets the forward host.
      Specified by:
      getForwardHost in interface JKContext
      Returns:
      the forward host
    • getRole

      public String getRole()
      Gets the role.
      Specified by:
      getRole in interface JKContext
      Returns:
      the role
    • setRole

      public void setRole(String role)
      Sets the role.
      Parameters:
      role - the new role
    • toString

      public String toString()
      To string.
      Overrides:
      toString in class Object
      Returns:
      the string
    • toSimpleMap

      public Map<String,Object> toSimpleMap()
      To simple map.
      Specified by:
      toSimpleMap in interface JKContext
      Returns:
      the map
    • setRemoteUser

      public void setRemoteUser(String userName)
      Sets the user name.
      Parameters:
      userName - the new user name
    • getRemoteUser

      public String getRemoteUser()
      Gets the user name.
      Specified by:
      getRemoteUser in interface JKContext
      Returns:
      the user name
    • setRemoteRole

      public void setRemoteRole(String role)
      Sets the remote role.
      Parameters:
      role - the new remote role
    • getRemoteRole

      public String getRemoteRole()
      Gets the remote role.
      Specified by:
      getRemoteRole in interface JKContext
      Returns:
      the remote role