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 classSASServlet.SASExceptionHandlerThingie
-
Field Summary
Fields Modifier and Type Field Description protected Initializationinitializationprotected SASEnvironmentsase
-
Constructor Summary
Constructors Constructor Description SASServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutablecreateExecutable(String executableName)Create the appropriate executable.voiddebug(String x)Write a debug message to the log.protected voiddoDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected ResponsedoExecute(SessionRecord sessionRecord, Action action)voiddoGet(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)protected voiddoIt(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)protected LogoffResponsedoLogoff(SASClient client, LogoffAction logoffAction, javax.servlet.http.HttpServletResponse response, SessionRecord sessionRecord, String message)protected LogonResponsedoLogon(LogonAction logonAction, SessionRecord sessionRecord)protected ResponsedoNewKey(SASClient client, NewKeyAction newKeyAction, javax.servlet.http.HttpServletResponse httpServletResponse, SessionRecord sessionRecord)voiddoPost(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)voiderror(String x)Write an error message to the log.voiderror(String x, Throwable t)SASConfigurationLoader<? extends SASEnvironment>getConfigurationLoader()ExceptionHandlergetExceptionHandler()InitializationgetInitialization()protected MyLoggingFacadegetMyLogger()protected SASEnvironmentgetSASE()protected voidhandleException(ExceptionHandlerThingie xh)voidinfo(String x)Write an informational message to the logprotected OutputResponseinvoke(SessionRecord sessionRecord, InvokeAction invokeAction)Invoke a specific method in theExecutablebooleanisDebugOn()Query if debugging is enabled for this logger.voidloadEnvironment()voidsetConfigurationLoader(SASConfigurationLoader<? extends SASEnvironment> b)voidsetDebugOn(boolean setOn)Enable/disable debugging for this loggervoidsetInitialization(Initialization initialization)voidsetSASE(SASEnvironment env)voidwarn(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:LogableQuery if debugging is enabled for this logger.
-
setDebugOn
public void setDebugOn(boolean setOn)
Description copied from interface:LogableEnable/disable debugging for this logger- Specified by:
setDebugOnin interfaceLogable
-
getMyLogger
protected MyLoggingFacade getMyLogger()
-
debug
public void debug(String x)
Description copied from interface:LogableWrite a debug message to the log.
-
error
public void error(String x)
Description copied from interface:LogableWrite 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:LogableWrite an informational message to the log
-
warn
public void warn(String x)
Description copied from interface:LogableWrite 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:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
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:
doDeletein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws javax.servlet.ServletException, IOException- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
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:
IOExceptionjavax.servlet.ServletException
-
getExceptionHandler
public ExceptionHandler getExceptionHandler()
-
-