Package org.waveprotocol.wave.model.id

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


    /** @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


    return create(
        new ParticipantId(Session.get().getAddress()).getDomain(), Session.get().getIdSeed());
  }

  private static IdGeneratorImpl create(String domain, final String seed) {
    return new IdGeneratorImpl(domain, new IdGeneratorImpl.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 IdGenerator provideIdGenerator(@Named(CoreSettings.WAVE_SERVER_DOMAIN) String domain,
      Seed seed) {
    return new IdGeneratorImpl(domain, seed);
  }
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

    return create(
        new ParticipantId(Session.get().getAddress()).getDomain(), Session.get().getIdSeed());
  }

  private static IdGeneratorImpl create(String domain, final String seed) {
    return new IdGeneratorImpl(domain, new IdGeneratorImpl.Seed() {
      @Override
      public String get() {
        return seed;
      }
    });
View Full Code Here

  @Provides
  @Singleton
  @Inject
  public IdGenerator provideIdGenerator(@Named(CoreSettings.WAVE_SERVER_DOMAIN) String domain,
      Seed seed) {
    return new IdGeneratorImpl(domain, seed);
  }
View Full Code Here

TOP

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

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.