Examples of SessionObject


Examples of com.jetdrone.vertx.yoke.store.json.SessionObject

        // call us when headers are being set for the response
        response.headersHandler(new Handler<Void>() {
            @Override
            public void handle(Void done) {
              SessionObject session = request.get("session");
                String sessionId = session == null ? null : session.getString("id");

                // removed
                if (sessionId == null) {
                    if (sessionCookie != null) {
                        cookie.setValue("");
View Full Code Here

Examples of com.jetdrone.vertx.yoke.store.json.SessionObject

    // Session management

    /** Destroys a session from the request context and also from the storage engine.
     */
    public void destroySession() {
      SessionObject session = get("session");
        if (session == null) {
            return;
        }

        String sessionId = session.getString("id");
        // remove from the context
        put("session", null);

        if (sessionId == null) {
            return;
View Full Code Here

Examples of com.jetdrone.vertx.yoke.store.json.SessionObject

        store.get(sessionId, new Handler<JsonObject>() {
            @Override
            public void handle(JsonObject session) {
                if (session != null) {
                    put("session", new SessionObject(session));
                }

                response().headersHandler(new Handler<Void>() {
                    @Override
                    public void handle(Void event) {
                        int responseStatus = response().getStatusCode();
                        // Only save on success and redirect status codes
                        if (responseStatus >= 200 && responseStatus < 400) {
                          SessionObject session = get("session");
                            if (session != null && session.isChanged()) {
                                store.set(sessionId, session.jsonObject(), new Handler<Object>() {
                                    @Override
                                    public void handle(Object error) {
                                        if (error != null) {
                                            // TODO: better handling of errors
                                            System.err.println(error);
View Full Code Here

Examples of com.jetdrone.vertx.yoke.store.json.SessionObject

     * @return {JsonObject} session
     */
    public JsonObject createSession(@NotNull final String sessionId) {
        final JsonObject session = new JsonObject().putString("id", sessionId);

        put("session", new SessionObject(session, true));

        response().headersHandler(new Handler<Void>() {
            @Override
            public void handle(Void event) {
                int responseStatus = response().getStatusCode();
                // Only save on success and redirect status codes
                if (responseStatus >= 200 && responseStatus < 400) {
                  SessionObject session = get("session");
                    if (session != null && session.isChanged()) {
                        store.set(sessionId, session.jsonObject(), new Handler<Object>() {
                            @Override
                            public void handle(Object error) {
                                if (error != null) {
                                    // TODO: better handling of errors
                                    System.err.println(error);
View Full Code Here

Examples of de.sciss.meloncillo.session.SessionObject

    }

    // to be called with shared lock on 'doors'!
    private void updateFields( SessionCollection.Event e )
    {
      SessionObject          so;
      final int            numObj  = scSel.size();
      String              name;
      final de.sciss.app.Application  app    = AbstractApplication.getApplication();

      if( numObj >= 1 ) {
        so    = (SessionObject) scSel.get( 0 );
        name  = numObj == 1 ? so.getName() : app.getResourceString( "observerMultiSelection" );
      } else {
        name  = app.getResourceString( "observerNoSelection" );
      }
      ggName.setText( name );
    }
View Full Code Here

Examples of de.sciss.meloncillo.session.SessionObject

      ggName.setText( name );
    }

    public void actionPerformed( ActionEvent e )
    {
      SessionObject      so;
      int            i, num;
      AbstractCompoundEdit  edit;
      String          name;
      List          coll, coll2;
      Object[]        args;
View Full Code Here

Examples of de.sciss.meloncillo.session.SessionObject

   */
    private void updateUserImages()
    {
        int        i;
    java.util.List  collSO;
    SessionObject  so;
    File      f;
    Toolkit      tk  = Toolkit.getDefaultToolkit();
    MediaTracker  mt  = new MediaTracker( this );
    Image      img;
    Object[]    errors;

    try {
      doc.bird.waitShared( Session.DOOR_GRP );
      collSO  = doc.getSelectedGroups().getAll();
      disposeUserImages();
      for( i = 0; i < collSO.size(); i++ ) {
        so  = (SessionObject) collSO.get( i );
        f  = (File) so.getMap().getValue( SessionGroup.MAP_KEY_USERIMAGE );
        if( f != null ) {
          img = tk.createImage( f.getAbsolutePath() );
          collUserImages.add( img );
        }
      }
View Full Code Here

Examples of de.sciss.meloncillo.session.SessionObject

    java.util.List      coll, coll2, collGroups, collGroups2, collGroups3, collGroups4;
    int            i, j;
    double          d1;
    String          val;
    Preferences        prefs;
    SessionObject      so;
 
    // --------------- create lisp symbols ---------------
    // GROUPS : list (list elements : hashtable)
    collGroups  = doc.getGroups().getAll();
    collGroups2  = new ArrayList( collGroups.size() );
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.