Package edu.uiuc.ncsa.sas
Class SASServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- edu.uiuc.ncsa.sas.SASServlet
-
- All Implemented Interfaces:
Logable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class SASServlet extends AbstractServlet
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 inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet
environment, initialization, IP_HEADERS, PING_PARAMETER
-
-
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.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)
SASExceptionHandler
getExceptionHandler()
protected SASEnvironment
getSASE()
protected void
handleException(ExceptionHandlerThingie xh)
One stop shopping for exception handling.protected OutputResponse
invoke(SessionRecord sessionRecord, InvokeAction invokeAction)
Invoke a specific method in theExecutable
void
loadEnvironment()
Loads the current environment.-
Methods inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet
checkContentType, CONST, debug, doPing, error, error, getConfigurationLoader, getEnvironment, getInitialization, getMyLogger, getRequestIPAddress, info, init, isDebugOn, logOK, logOK, printAllParameters, printAllParameters, resetState, setConfigurationLoader, setDebugOn, setEnvironment, setExceptionHandler, setInitialization, warn
-
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
loadEnvironment
public void loadEnvironment() throws IOException
Description copied from class:AbstractServlet
Loads the current environment. This is *not* called automatically. Usually a user will create a custom environment and have a getter for that which checks if the environment has been set and if not, load it or if so, cast it and return the result.- Specified by:
loadEnvironment
in classAbstractServlet
- Throws:
IOException
-
getSASE
protected SASEnvironment getSASE()
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws javax.servlet.ServletException, IOException
- Overrides:
doGet
in classAbstractServlet
- 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 classAbstractServlet
- Throws:
javax.servlet.ServletException
IOException
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws Throwable
- Specified by:
doIt
in classAbstractServlet
- 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
Description copied from class:AbstractServlet
One stop shopping for exception handling. All thrown exceptions are intercepted and run through this. Depending on their type they are wrapped or passed along. You can change this behavior if you need to.Note that all runtime exceptions, IOExceptions and ServletExceptions are not modified, so if you over-ride this and throw one of those exceptions you will not get extra cruft.
Also, a response is passed along. This may be used in over-rides, but is not used in the basic implementation. If it is null, it should be ignored.
- Overrides:
handleException
in classAbstractServlet
- Throws:
IOException
javax.servlet.ServletException
-
getExceptionHandler
public SASExceptionHandler getExceptionHandler()
- Overrides:
getExceptionHandler
in classAbstractServlet
-
-