Examples of TimeSource


Examples of hirondelle.web4j.util.TimeSource

   See {@link ActionImpl#getTimeZone()}.
  
   <P>Only millisecond precision is possible for this method.
   */
  public static DateTime now(TimeZone aTimeZone) {
    TimeSource timesource = BuildImpl.forTimeSource();
    return forInstant(timesource.currentTimeMillis(), aTimeZone);
  }
View Full Code Here

Examples of kanakata.runtime.TimeSource

    public void setUpEmptySystemProperty(final String propertyName) {
        setUpSystemProperty(propertyName, null);
    }

    public void setUpSystemTime(TimeSource source) {
        final TimeSource systemTimeSource = SystemTime.getSource();
        SystemTime.set(source);
        registerCleanupAction(new CleanupAction() {
            public void perform() throws Exception {
                SystemTime.set(systemTimeSource);
            }
View Full Code Here

Examples of net.rim.device.api.util.TimeSource

        // Set up the lose sprite
        _lose = new Sprite("lose.png");
        _lose._transform.setScale(new Vector3f(5.0f, 5.0f, 5.0f));
        _lose._transform.setTranslation(translation);

        _timeSource = new TimeSource();
        _timeSource.start();
        _animator = new Animator(0, _timeSource);

        // Set up the win animation
        _winAnimation =
View Full Code Here

Examples of org.apache.shindig.common.util.TimeSource

    HttpResponse response = new HttpResponseBuilder()
        .setExpirationTime(expiration)
        .create();
    cache.map.put(key, response);

    TimeSource fakeClock = new FakeTimeSource(expiration + 60L);

    cache.setClock(fakeClock);

    assertNull("Returned an expired entry when removing from the cache.",
               cache.removeResponse(request));
View Full Code Here

Examples of org.apache.shindig.common.util.TimeSource

  public void testOAuthFetcherConfig() {
    BlobCrypter crypter = mock(BlobCrypter.class);
    mock(HttpCache.class);
    GadgetOAuthTokenStore tokenStore = mock(GadgetOAuthTokenStore.class);
    OAuthCallbackGenerator callbackGenerator = mock(OAuthCallbackGenerator.class);
    OAuthFetcherConfig config = new OAuthFetcherConfig(crypter, tokenStore, new TimeSource(),
        callbackGenerator);
    assertEquals(crypter, config.getStateCrypter());
    assertEquals(tokenStore, config.getTokenStore());
    assertEquals(callbackGenerator, config.getOAuthCallbackGenerator());
  }
View Full Code Here

Examples of org.apache.shindig.common.util.TimeSource

        .andReturn(badResponse).once();
    replay(pipeline);

    final AtomicLong time = new AtomicLong();

    bundleFactory.cache.setTimeSource(new TimeSource() {
      @Override
      public long currentTimeMillis() {
        return time.get();
      }
    });
View Full Code Here

Examples of org.apache.shindig.common.util.TimeSource

   public ExoDefaultSecurityTokenGenerator() throws Exception
   {
      // TODO should be moved to config
      // generateKeys("RSA", 1024);
      this.containerKey =  getKeyFilePath();
      this.timeSource = new TimeSource();
   }
View Full Code Here

Examples of org.apache.shindig.common.util.TimeSource

        .andReturn(badResponse).once();
    replay(pipeline);

    final AtomicLong time = new AtomicLong();

    bundleFactory.cache.setTimeSource(new TimeSource() {
      @Override
      public long currentTimeMillis() {
        return time.get();
      }
    });
View Full Code Here

Examples of org.apache.shindig.common.util.TimeSource

    /** . */
    private final Logger log = LoggerFactory.getLogger(ExoDefaultSecurityTokenGenerator.class);

    public ExoDefaultSecurityTokenGenerator() throws Exception {
        this.timeSource = new TimeSource();
    }
View Full Code Here

Examples of org.apache.shindig.common.util.TimeSource

  private static class TestFeatureResourceLoader extends FeatureResourceLoader {
    private final ResourceMock resourceMock;
    private Map<String, String> lastAttribs;

    private TestFeatureResourceLoader(ResourceMock resourceMock) {
      super(null, new TimeSource(), new DefaultFeatureFileSystem());
      this.resourceMock = resourceMock;
    }
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.