mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Convert request factory components into a module
Move all of the code to create the request factories into RequestFactoryModule. Also add the --force_http_connection flag to allow us to force the use of HTTP connections instead of HTTPOverRPC for our internal connections. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146116640
This commit is contained in:
parent
b70f57b7c7
commit
ecbe2662ac
9 changed files with 99 additions and 157 deletions
|
@ -17,6 +17,8 @@ package google.registry.tools;
|
|||
import com.beust.jcommander.Parameter;
|
||||
import com.beust.jcommander.Parameters;
|
||||
import com.google.common.net.HostAndPort;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import google.registry.config.RegistryConfig;
|
||||
|
||||
/**
|
||||
|
@ -34,5 +36,19 @@ class AppEngineConnectionFlags {
|
|||
HostAndPort getServer() {
|
||||
return server;
|
||||
}
|
||||
|
||||
@Module
|
||||
static class FlagsModule {
|
||||
AppEngineConnectionFlags flags;
|
||||
|
||||
FlagsModule(AppEngineConnectionFlags flags) {
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
@Provides
|
||||
AppEngineConnectionFlags provideAppEngineConnectionFlags() {
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue