Search in sources :

Example 11 with SessionRequest

use of com.iplanet.dpro.session.share.SessionRequest in project OpenAM by OpenRock.

the class Session method addInternalSessionListener.

/**
     * Add listener to Internal Session.
     */
public void addInternalSessionListener() {
    try {
        if (SessionNotificationHandler.handler == null) {
            SessionNotificationHandler.handler = new SessionNotificationHandler();
            PLLClient.addNotificationHandler(SESSION_SERVICE, SessionNotificationHandler.handler);
        }
        String url = WebtopNaming.getNotificationURL().toString();
        if (isLocal()) {
            sessionService.addSessionListener(sessionID, url);
        } else {
            SessionRequest sreq = new SessionRequest(SessionRequest.AddSessionListener, sessionID.toString(), false);
            sreq.setNotificationURL(url);
            requests.sendRequestWithRetry(getSessionServiceURL(), sreq, this);
        }
    } catch (Exception e) {
    //todo : something! :-D
    }
}
Also used : SessionRequest(com.iplanet.dpro.session.share.SessionRequest) ThreadPoolException(com.iplanet.am.util.ThreadPoolException) SSOException(com.iplanet.sso.SSOException)

Aggregations

SessionRequest (com.iplanet.dpro.session.share.SessionRequest)11 SessionException (com.iplanet.dpro.session.SessionException)7 SessionResponse (com.iplanet.dpro.session.share.SessionResponse)7 SessionInfo (com.iplanet.dpro.session.share.SessionInfo)4 SessionID (com.iplanet.dpro.session.SessionID)3 SSOException (com.iplanet.sso.SSOException)3 SSOToken (com.iplanet.sso.SSOToken)3 ThreadPoolException (com.iplanet.am.util.ThreadPoolException)2 Response (com.iplanet.services.comm.share.Response)2 URL (java.net.URL)2 HashMap (java.util.HashMap)2 Request (com.iplanet.services.comm.share.Request)1 RequestSet (com.iplanet.services.comm.share.RequestSet)1 SSOTokenManager (com.iplanet.sso.SSOTokenManager)1 SearchResults (com.sun.identity.common.SearchResults)1 RestrictedTokenAction (com.sun.identity.session.util.RestrictedTokenAction)1 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 LinkedList (java.util.LinkedList)1 Map (java.util.Map)1