Search in sources :

Example 1 with Time

use of org.webpieces.util.time.Time in project webpieces by deanhiller.

the class OverridesForEmbeddedSvrNoParsing method configure.

@Override
public void configure(Binder binder) {
    binder.bind(HttpFrontendManager.class).toInstance(frontEnd);
    binder.bind(MeterRegistry.class).toInstance(metrics);
    binder.bind(Time.class).toInstance(time);
    binder.bind(ScheduledExecutorService.class).toInstance(mockTimer);
    // By using the DevTemplateService, we do not need to re-run the gradle build and generate html
    // files every time we change the html code AND instead can just run the test in our IDE.
    // That said, there is a setting when this test runs in gradle that skips this step and runs the
    // production groovy *.class file that will be run in production (ie. the test run in the IDE
    // and run in gradle differ just a little :( )
    // BUTTTTTT, the upside is when run in gradle we are running the full prod version
    binder.install(new DevTemplateModule(templateConfig));
}
Also used : ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) HttpFrontendManager(org.webpieces.frontend2.api.HttpFrontendManager) DevTemplateModule(org.webpieces.templatingdev.api.DevTemplateModule) Time(org.webpieces.util.time.Time) MockTime(org.webpieces.mock.time.MockTime) MeterRegistry(io.micrometer.core.instrument.MeterRegistry)

Example 2 with Time

use of org.webpieces.util.time.Time in project webpieces by deanhiller.

the class OverridesForEmbeddedSvrWithParsing method configure.

@Override
public void configure(Binder binder) {
    binder.bind(MeterRegistry.class).toInstance(metrics);
    binder.bind(ChannelManager.class).toInstance(mgr);
    binder.bind(Time.class).toInstance(time);
    binder.bind(ScheduledExecutorService.class).toInstance(mockTimer);
    // By using the DevTemplateService, we do not need to re-run the gradle build and generate html
    // files every time we change the html code AND instead can just run the test in our IDE.
    // That said, there is a setting when this test runs in gradle that skips this step and runs the
    // production groovy *.class file that will be run in production (ie. the test run in the IDE
    // and run in gradle differ just a little :( )
    // BUTTTTTT, the upside is when run in gradle we are running the full prod version
    binder.install(new DevTemplateModule(templateConfig));
}
Also used : ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) ChannelManager(org.webpieces.nio.api.ChannelManager) DevTemplateModule(org.webpieces.templatingdev.api.DevTemplateModule) Time(org.webpieces.util.time.Time) MockTime(org.webpieces.mock.time.MockTime) MeterRegistry(io.micrometer.core.instrument.MeterRegistry)

Aggregations

MeterRegistry (io.micrometer.core.instrument.MeterRegistry)2 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)2 MockTime (org.webpieces.mock.time.MockTime)2 DevTemplateModule (org.webpieces.templatingdev.api.DevTemplateModule)2 Time (org.webpieces.util.time.Time)2 HttpFrontendManager (org.webpieces.frontend2.api.HttpFrontendManager)1 ChannelManager (org.webpieces.nio.api.ChannelManager)1