Package edu.uiuc.ncsa.sas
Class SASServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.sas.SASServlet
-
- All Implemented Interfaces:
Logable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class SASServlet extends javax.servlet.http.HttpServlet implements Logable
Created by Jeff Gaynor
on 8/15/22 at 8:29 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SASServlet.SASExceptionHandlerThingie
-
Field Summary
Fields Modifier and Type Field Description protected Initialization
initialization
protected SASEnvironment
sase
-
Constructor Summary
Constructors Constructor Description SASServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Executable
createExecutable(String executableName)
Create the appropriate executable.void
debug(String x)
Write a debug message to the log.protected void
doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
protected Response
doExecute(SessionRecord sessionRecord, Action action)
void
doGet(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
protected void
doIt(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
protected LogoffResponse
doLogoff(SASClient client, LogoffAction logoffAction, javax.servlet.http.HttpServletResponse response, SessionRecord sessionRecord, String message)
protected LogonResponse
doLogon(LogonAction logonAction, SessionRecord sessionRecord)
protected Response
doNewKey(SASClient client, NewKeyAction newKeyAction, javax.servlet.http.HttpServletResponse httpServletResponse, SessionRecord sessionRecord)
void
doPost(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
void
error(String x)
Write an error message to the log.void
error(String x, Throwable t)
SASConfigurationLoader<? extends SASEnvironment>
getConfigurationLoader()
ExceptionHandler
getExceptionHandler()
Initialization
getInitialization()
protected MyLoggingFacade
getMyLogger()
protected SASEnvironment
getSASE()
protected void
handleException(ExceptionHandlerThingie xh)
void
info(String x)
Write an informational message to the logprotected OutputResponse
invoke(SessionRecord sessionRecord, InvokeAction invokeAction)
Invoke a specific method in theExecutable
boolean
isDebugOn()
Query if debugging is enabled for this logger.void
loadEnvironment()
void
setConfigurationLoader(SASConfigurationLoader<? extends SASEnvironment> b)
void
setDebugOn(boolean setOn)
Enable/disable debugging for this loggervoid
setInitialization(Initialization initialization)
void
setSASE(SASEnvironment env)
void
warn(String x)
Write a warning to the log.-
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
initialization
protected Initialization initialization
-
sase
protected SASEnvironment sase
-
-
Method Detail
-
getInitialization
public Initialization getInitialization()
-
setInitialization
public void setInitialization(Initialization initialization)
-
getConfigurationLoader
public SASConfigurationLoader<? extends SASEnvironment> getConfigurationLoader()
-
setConfigurationLoader
public void setConfigurationLoader(SASConfigurationLoader<? extends SASEnvironment> b)
-
setSASE
public void setSASE(SASEnvironment env)
-
loadEnvironment
public void loadEnvironment() throws IOException
- Throws:
IOException
-
getSASE
protected SASEnvironment getSASE()
-
isDebugOn
public boolean isDebugOn()
Description copied from interface:Logable
Query if debugging is enabled for this logger.
-
setDebugOn
public void setDebugOn(boolean setOn)
Description copied from interface:Logable
Enable/disable debugging for this logger- Specified by:
setDebugOn
in interfaceLogable
-
getMyLogger
protected MyLoggingFacade getMyLogger()
-
debug
public void debug(String x)
Description copied from interface:Logable
Write a debug message to the log.
-
error
public void error(String x)
Description copied from interface:Logable
Write an error message to the log. Typically this is invoked as the last command before throwing an exception.
-
info
public void info(String x)
Description copied from interface:Logable
Write an informational message to the log
-
warn
public void warn(String x)
Description copied from interface:Logable
Write a warning to the log. This indicates a severe, but non-fatal condition exists.
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws javax.servlet.ServletException, IOException
- Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doLogon
protected LogonResponse doLogon(LogonAction logonAction, SessionRecord sessionRecord) throws IOException
- Throws:
IOException
-
createExecutable
public Executable createExecutable(String executableName)
Create the appropriate executable.- Parameters:
executableName
- name to allow you to choose which executable to create- Returns:
-
doLogoff
protected LogoffResponse doLogoff(SASClient client, LogoffAction logoffAction, javax.servlet.http.HttpServletResponse response, SessionRecord sessionRecord, String message) throws IOException
- Throws:
IOException
-
doDelete
protected void doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
- Overrides:
doDelete
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws javax.servlet.ServletException, IOException
- Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws Throwable
- Throws:
Throwable
-
doNewKey
protected Response doNewKey(SASClient client, NewKeyAction newKeyAction, javax.servlet.http.HttpServletResponse httpServletResponse, SessionRecord sessionRecord)
-
invoke
protected OutputResponse invoke(SessionRecord sessionRecord, InvokeAction invokeAction)
Invoke a specific method in theExecutable
- Parameters:
sessionRecord
-invokeAction
-- Returns:
-
doExecute
protected Response doExecute(SessionRecord sessionRecord, Action action)
-
handleException
protected void handleException(ExceptionHandlerThingie xh) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
getExceptionHandler
public ExceptionHandler getExceptionHandler()
-
-