Package org.waveprotocol.wave.model.id.IdGeneratorImpl

Examples of org.waveprotocol.wave.model.id.IdGeneratorImpl.Seed


    /** @return the id generator for model object. Subclasses may override. */
    protected IdGenerator createIdGenerator() {
      final String seed = getSessionId();
      // Replace with session.
      return new IdGeneratorImpl(getSignedInUser().getDomain(), new Seed() {
        @Override
        public String get() {
          return seed;
        }
      });
View Full Code Here


  private IdGenerator idGenerator;

  @Override
  protected void setUp() throws Exception {
    idGenerator = new IdGeneratorImpl(DOMAIN, new Seed() {
      @Override
      public String get() {
        return "seed";
      }
    });
View Full Code Here

  // Prevent instantiation
  private FakeIdGenerator() {}

  public static IdGenerator create() {
    return new IdGeneratorImpl("example.com", new Seed() {
      @Override
      public String get() {
        return "seed";
      }
    });
View Full Code Here

  }

  @Provides
  @Singleton
  public Seed provideSeed(final SecureRandom random) {
    return new Seed() {
      @Override
      public String get() {
        return Long.toString(Math.abs(random.nextLong()), 36);
      }
    };
View Full Code Here

    /** @return the id generator for model object. Subclasses may override. */
    protected IdGenerator createIdGenerator() {
      final String seed = getSessionId();
      // Replace with session.
      return new IdGeneratorImpl(getSignedInUser().getDomain(), new Seed() {
        @Override
        public String get() {
          return seed;
        }
      });
View Full Code Here

  // Prevent instantiation
  private FakeIdGenerator() {}

  public static IdGenerator create() {
    return new IdGeneratorImpl("example.com", new Seed() {
      @Override
      public String get() {
        return "seed";
      }
    });
View Full Code Here

  @Provides
  @Singleton
  @Inject
  public Seed provideSeed(final SecureRandom random) {
    return new Seed() {
      @Override
      public String get() {
        return Long.toString(Math.abs(random.nextLong()), 36);
      }
    };
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.id.IdGeneratorImpl.Seed

Copyright © 2018 www.massapicom. 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.