SessionRequestHandler.java revision c5b669842423d36fc543ddd3ea318bbae4231ecf
2N/A * at opensso/legal/CDDLv1.0.txt.
2N/A * $Id: SessionRequestHandler.java,v 1.9 2009/04/02 04:11:44 ericow Exp $
* Responsible for processing a PLL request and routing it to the appropriate handler which will respond to the caller
* In the first group, the request is targeting either all LOCAL sessions or a single local session identified by another
* request parameter. The session ID in this case is only used to authenticate the operation. That session is not
* In the second group, the request is targeting a single session identified by a session ID, which is supposed to be
* hosted by this server instance. The session ID is used both as an id for the target session and to authenticate the
* operation (i.e. operations are performed on the callers own session). The operations in this group are:
private static final SessionServiceURLService SESSION_SERVICE_URL_SERVICE = InjectorHolder.getInstance(SessionServiceURLService.class);
private static final SessionPLLSender sessionPLLSender = InjectorHolder.getInstance(SessionPLLSender.class);
public SessionRequestHandler() {
return rset;
new RestrictedTokenAction() {
private SessionResponse processSessionRequest(PLLAuditor auditor, SessionRequest req) throws SessionException,
throw se;
throw new SessionRequestException(requesterSession.getSessionID(), SessionBundle.getString("noPrivilege"));
private void verifyValidRequest(SessionRequest req, Session requesterSession) throws SessionException,
throw new SessionRequestException(requesterSession.getSessionID(), SessionBundle.getString("noPrivilege"));
throw new SessionRequestException(requesterSession.getSessionID(), SessionBundle.getString("unknownRequestMethod"));
* Verify that this server is the correct host for the session and the session can be found(or recovered) locally.
* This function will become much simpler with removal of home servers, or possibly no longer be required.
throw new ForwardSessionRequestException(
throw se;
throw new ForwardSessionRequestException(
throw se;
private SessionResponse processMethod(SessionRequest req, Session requesterSession) throws SessionException {
res.addSessionInfo(sessionService.getSessionInfo(requesterSession.getSessionID(), req.getResetFlag()));
return handleException(req, requesterSession.getSessionID(), SessionBundle.getString("invalidSessionID"));
sessionService.setExternalProperty(this.clientToken, requesterSession.getSessionID(), req.getPropertyName(), req.getPropertyValue());
return handleException(req, requesterSession.getSessionID(), SessionBundle.getString("unknownRequestMethod"));
return res;
throws SessionException {
return sres;
throw se;
return response;
return sid;
return responseMessage;
// This exception is not ideal, but will be removed when crosstalk is removed, and allows the code to better be
return response;