Examples of SessionInformation


Examples of net.relatedwork.client.tools.session.SessionInformation

    super.onReveal();
    setInSlot(TYPE_Footer, footerPresenter);
    setInSlot(TYPE_Header, headerPresenter);
    setInSlot(TYPE_Sidebar, sidebarPresenter);

        SessionInformation sessionInformation = sessionInformationManager.get();
    // Register Session
    sessionInformation.continueSession();

    // fire Login/Logout depending on wether we continue a user session
    if (sessionInformation.isLoggedIn()) {
      getEventBus().fireEvent(new LoginEvent(sessionInformation));
    }

    // Remark: RPC calls have to be in onReveal!
    // Does not work at onBind, onReset! -> null object exception
View Full Code Here

Examples of net.relatedwork.client.tools.session.SessionInformation

  }

 
  private void updateLabel() {
    SessionInformation session = sessionInformationManager.get();
//    Window.alert("UpdatingLabel " + session.getSessionId());
    getView().getLoginStatus().setText(
        "Username:" + session.getUsername() + " -- " +
        "SessionId:" + session.getSessionId() );
  }
View Full Code Here

Examples of net.relatedwork.client.tools.session.SessionInformation

        });

        getView().setVoteHandler(new VoteEvent() {
            @Override
            public void vote(boolean up) {
                SessionInformation sessionInformation = checkLogin();
                if (sessionInformation == null) return;

                getEventBus().fireEvent(new LoadingOverlayEvent(true));

                String loggedInUser = sessionInformation.getEmailAddress();

                CommentVoteAction commentVoteAction = new CommentVoteAction(loggedInUser, comment.getUri(), up);
                dispatcher.execute(commentVoteAction, new AsyncCallback<CommentVoteResult>() {
                    @Override
                    public void onFailure(Throwable caught) {
View Full Code Here

Examples of net.relatedwork.client.tools.session.SessionInformation

        this.submission = submitted;
    }


    private SessionInformation checkLogin() {
        SessionInformation sessionInformation = sessionInformationManager.get();
        if (!sessionInformation.isLoggedIn()) {
//            Window.alert("Please login!");
//            return null;
        }
        return sessionInformation;
    }
View Full Code Here

Examples of net.relatedwork.client.tools.session.SessionInformation

      throws ActionException {
    //TODO: Implement Serverside user handling
    // Check login
    String email = loginAction.getEmail();
    String password = loginAction.getPassword();
    SessionInformation SIO = loginAction.getSession();
   
    UserInformation UIO = new UserInformation(servletContext);
   
    try {
      UIO.loginUser(loginAction);
View Full Code Here

Examples of net.relatedwork.client.tools.session.SessionInformation

    IOHelper.log("User "+ this.email+ " authenticated: "+
     authSecret + " == " + action.getSecret());
   
    /* Login user */
    registerSessionId(action.getSession().sessionId);
    SessionInformation session = updateSIO(action.getSession());
   
    save();
   
    return new UserVerifyActionResult(session);
   
View Full Code Here

Examples of net.relatedwork.client.tools.session.SessionInformation

    }
   
    loadFromNode(userLoginNode);
   
    registerSessionId(loginAction.getSession().sessionId);
    SessionInformation session = updateSIO(loginAction.getSession());
   
    save();
   
    IOHelper.log("User logged in");
    print()
View Full Code Here

Examples of net.relatedwork.client.tools.session.SessionInformation

        Node authorNode = null;
        for (Relationship rel: commentNode.getRelationships(DBRelationshipTypes.COMMENT_AUTHOR)) {
            authorNode = rel.getOtherNode(commentNode);
        }

        SessionInformation author;
        if (authorNode == null) {
            // assume a default author if not found
            author = new SessionInformation();
        } else {
            author = null; // construct from authorNode
        }

        String targetUri;
View Full Code Here

Examples of org.apache.synapse.endpoints.dispatch.SessionInformation

    public LoadBalanceMembershipHandler getLbMembershipHandler() {
        return lbMembershipHandler;
    }

    public void send(MessageContext synCtx) {
        SessionInformation sessionInformation = null;
        Member currentMember = null;
        ConfigurationContext configCtx =
                ((Axis2MessageContext) synCtx).getAxis2MessageContext().getConfigurationContext();
        if (lbMembershipHandler.getConfigurationContext() == null) {
            lbMembershipHandler.setConfigurationContext(configCtx);
        }

        if (isSessionAffinityBasedLB()) {
            // first check if this session is associated with a session. if so, get the endpoint
            // associated for that session.
            sessionInformation =
                    (SessionInformation) synCtx.getProperty(
                            SynapseConstants.PROP_SAL_CURRENT_SESSION_INFORMATION);

            currentMember = (Member) synCtx.getProperty(
                    SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_MEMBER);

            if (sessionInformation == null && currentMember == null) {
                sessionInformation = dispatcher.getSession(synCtx);
                if (sessionInformation != null) {

                    if (log.isDebugEnabled()) {
                        log.debug("Current session id : " + sessionInformation.getId());
                    }

                    currentMember = sessionInformation.getMember();
                    synCtx.setProperty(
                            SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_MEMBER, currentMember);
                    // This is for reliably recovery any session information if while response is getting ,
                    // session information has been removed by cleaner.
                    // This will not be a cost as  session information a not heavy data structure
                    synCtx.setProperty(
                            SynapseConstants.PROP_SAL_CURRENT_SESSION_INFORMATION, sessionInformation);
                }
            }

        }
       
        if (sessionInformation != null && currentMember != null) {
            //send message on current session
            sessionInformation.updateExpiryTime();
            sendToApplicationMember(synCtx, currentMember, false);
        } else {
            // prepare for a new session
            currentMember = lbMembershipHandler.getNextApplicationMember(algorithmContext);
            if (currentMember == null) {
View Full Code Here

Examples of org.apache.synapse.endpoints.dispatch.SessionInformation

            log.debug("Start : Session Affinity Load-balance Endpoint " + getName());
        }
        // first check if this session is associated with a session. if so, get the endpoint
        // associated for that session.

        SessionInformation sessionInformation =
                (SessionInformation) synCtx.getProperty(
                        SynapseConstants.PROP_SAL_CURRENT_SESSION_INFORMATION);

        List<Endpoint> endpoints = (List<Endpoint>) synCtx.getProperty(
                SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_ENDPOINT_LIST);

        if (sessionInformation == null && endpoints == null) {

            sessionInformation = dispatcher.getSession(synCtx);
            if (sessionInformation != null) {

                if (log.isDebugEnabled()) {
                    log.debug("Current session id : " + sessionInformation.getId());
                }
                endpoints =
                        dispatcher.getEndpoints(sessionInformation);
                if (log.isDebugEnabled()) {
                    log.debug("Endpoint sequence (path) on current session : " + this + endpoints);
                }

                synCtx.setProperty(
                        SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_ENDPOINT_LIST, endpoints);
                // This is for reliably recovery any session information if while response is getting ,
                // session information has been removed by cleaner.
                // This will not be a cost as  session information a not heavy data structure
                synCtx.setProperty(
                        SynapseConstants.PROP_SAL_CURRENT_SESSION_INFORMATION, sessionInformation);
            }
        }

        if (sessionInformation != null && endpoints != null) {
            //send message on current session
            sendMessageOnCurrentSession(sessionInformation.getId(), endpoints, synCtx);
        } else {
            // prepare for a new session
            sendMessageOnNewSession(synCtx);
        }
    } 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.