Examples of self()


Examples of org.glyptodon.guacamole.net.auth.UserContext.self()

                    context = authProvider.getUserContext(credentials);

                    // Log successful authentication
                    if (context != null && logger.isInfoEnabled())
                        logger.info("User \"{}\" successfully authenticated from {}.",
                                context.self().getUsername(), getLoggableAddress(request));
                   
                }

                // Otherwise, update existing context
                else
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.UserContext.self()

                    context.getRootConnectionGroup().getConnectionDirectory();

                // Get authorized connection
                Connection connection = directory.get(id);
                if (connection == null) {
                    logger.info("Connection \"{}\" does not exist for user \"{}\".", id, context.self().getUsername());
                    throw new GuacamoleSecurityException("Requested connection is not authorized.");
                }

                // Connect socket
                socket = connection.connect(info);
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.UserContext.self()

                    throw new GuacamoleSecurityException("Requested connection is not authorized.");
                }

                // Connect socket
                socket = connection.connect(info);
                logger.info("User \"{}\" successfully connected to \"{}\".", context.self().getUsername(), id);
                break;
            }

            // Connection group identifiers
            case CONNECTION_GROUP: {
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.UserContext.self()

                    context.getRootConnectionGroup().getConnectionGroupDirectory();

                // Get authorized connection group
                ConnectionGroup group = directory.get(id);
                if (group == null) {
                    logger.info("Connection group \"{}\" does not exist for user \"{}\".", id, context.self().getUsername());
                    throw new GuacamoleSecurityException("Requested connection group is not authorized.");
                }

                // Connect socket
                socket = group.connect(info);
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.UserContext.self()

                    throw new GuacamoleSecurityException("Requested connection group is not authorized.");
                }

                // Connect socket
                socket = group.connect(info);
                logger.info("User \"{}\" successfully connected to group \"{}\".", context.self().getUsername(), id);
                break;
            }

            // Fail if unsupported type
            default:
View Full Code Here

Examples of org.robotninjas.barge.log.RaftLog.self()

  public void init(@Nonnull final RaftStateContext ctx) {

    final RaftLog log = getLog();

    log.currentTerm(log.currentTerm() + 1);
    log.votedFor(Optional.of(log.self()));

    LOGGER.debug("Election starting for term {}", log.currentTerm());

    List<ListenableFuture<RequestVoteResponse>> responses = Lists.newArrayList();
    // Request votes from peers
View Full Code Here

Examples of org.robotninjas.barge.log.RaftLog.self()

    RaftLog log = getLog();
    RequestVote request =
      RequestVote.newBuilder()
        .setTerm(log.currentTerm())
        .setCandidateId(log.self().toString())
        .setLastLogIndex(log.lastLogIndex())
        .setLastLogTerm(log.lastLogTerm())
        .build();

    ListenableFuture<RequestVoteResponse> response = client.requestVote(replica, request);
View Full Code Here

Examples of org.robotninjas.barge.log.RaftLog.self()

  public void init(@Nonnull RaftStateContext ctx) {
    RaftLog log = getLog();

    MDC.put("state", Raft.StateType.START.name());
    MDC.put("term", Long.toString(log.currentTerm()));
    MDC.put("self", log.self().toString());
    log.load();
    ctx.setState(this, FOLLOWER);
  }

  @Nonnull
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.