diff options
Diffstat (limited to 'infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfModule.groovy')
-rw-r--r-- | infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfModule.groovy | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfModule.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfModule.groovy index 4a66a1c3c..e8594a8c3 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfModule.groovy +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfModule.groovy @@ -27,10 +27,13 @@ import org.opendaylight.netconf.sal.rest.api.RestConnector @Slf4j class RestconfModule extends AbstractModule { + public static final String RESTCONF_HTTP = "restconf-http" + public static final String RESTCONF_HTTPS = "restconf-https" + protected void configure() { bind(Server).toProvider(JettyServerProvider).in(Singleton) - bind(ServerConnector).annotatedWith(Names.named("restconf-http")).toProvider(HttpConnectorProvider).in(Singleton) - bind(ServerConnector).annotatedWith(Names.named("restconf-https")).toProvider(HttpsConnectorProvider).in(Singleton) + bind(ServerConnector).annotatedWith(Names.named(RESTCONF_HTTP)).toProvider(HttpConnectorProvider).in(Singleton) + bind(ServerConnector).annotatedWith(Names.named(RESTCONF_HTTPS)).toProvider(HttpsConnectorProvider).in(Singleton) bind(RestConnector).toProvider(RestconfProvider).in(Singleton) } } |