at.spardat.xma.session
Class LoginServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
at.spardat.xma.session.LoginServlet
- All Implemented Interfaces:
- IRPCExecutorServer, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class LoginServlet
- extends javax.servlet.http.HttpServlet
- implements IRPCExecutorServer
This class handles the server side creation and destroying of sessions.
This servlet only services POST-Requests and takes one parameter
named "operation". If this parameter is "checkVersion", it sends back the
hashcode of the application and the version number of the xma runtime as
http servlet response. In all other cases, the reqeust is executed as base rpc.
Valid RPCs are:
- getChallange: sends back a challenge string for use by the encryption
- login: validates the user information and creates the
XMASessionServer on success
- keepAlive: does nothing
- logout: destroys the HttpSession
- contextChanged: validates and changes the user information in the
XMASessionServer on success
- See Also:
- Serialized Form
|
Method Summary |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the post-requests to this servlet. |
void |
execute(java.lang.String operation,
ClientToServerData request,
ServerToClientData response,
javax.servlet.http.HttpServletRequest httpRequest)
Excecutes the given operation of the base rpc. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoginServlet
public LoginServlet()
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Handles the post-requests to this servlet. If the request-parameter "operation" is
"checkVersion" it sends back the hashcode of the application and the version number
of the xma runtime. In all other cases, the reqeust is interpreted as
base rpc and executed accordingly.
- Parameters:
request - response -
- Throws:
java.io.IOException - passed from the stream operations
javax.servlet.ServletException
execute
public void execute(java.lang.String operation,
ClientToServerData request,
ServerToClientData response,
javax.servlet.http.HttpServletRequest httpRequest)
- Excecutes the given operation of the base rpc.
The valid operation names are:
- getPreLoginInfo: sends back pre login information
- login: validates and completes the user information and creates the
XMASessionServer on success
- keepAlive: does nothing
- logout: destroys the HttpSession
- contextChanged: validates and changes the user information in the
XMASessionServer on success
- Specified by:
execute in interface IRPCExecutorServer
- Parameters:
request - data send from the clientresponse - data to be send to the clienthttpRequest - original http servlet requestoperation - the name of the RPC as provided in the constructor of BaseRPCClient.