Skip to content

Commit f47a96c

Browse files
Add state estimation orchestrator server. (#109)
Signed-off-by: Franck LECUYER <[email protected]>
1 parent b51fc97 commit f47a96c

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

src/main/java/org/gridsuite/gateway/GatewayConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public RouteLocator myRoutes(RouteLocatorBuilder builder, ApplicationContext con
6161
.route(p -> context.getBean(VoltageInitServer.class).getRoute(p))
6262
.route(p -> context.getBean(ShortCircuitServer.class).getRoute(p))
6363
.route(p -> context.getBean(StateEstimationServer.class).getRoute(p))
64+
.route(p -> context.getBean(StateEstimationOrchestratorServer.class).getRoute(p))
6465
.build();
6566
}
6667
}

src/main/java/org/gridsuite/gateway/ServiceURIsConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,7 @@ public class ServiceURIsConfig {
107107

108108
@Value("${gridsuite.services.state-estimation-server.base-uri:http://state-estimation-server/}")
109109
String stateEstimationServerBaseUri;
110+
111+
@Value("${gridsuite.services.state-estimation-orchestrator-server.base-uri:http://state-estimation-orchestrator-server/}")
112+
String stateEstimationOrchestratorServerBaseUri;
110113
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
Copyright (c) 2024, RTE (http://www.rte-france.com)
3+
This Source Code Form is subject to the terms of the Mozilla Public
4+
License, v. 2.0. If a copy of the MPL was not distributed with this
5+
file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
*/
7+
package org.gridsuite.gateway.endpoints;
8+
9+
import org.gridsuite.gateway.ServiceURIsConfig;
10+
import org.springframework.stereotype.Component;
11+
12+
/**
13+
* @author Franck Lecuyer <franck.lecuyer at rte-france.com>
14+
*/
15+
@Component(value = StateEstimationOrchestratorServer.ENDPOINT_NAME)
16+
public class StateEstimationOrchestratorServer implements EndPointServer {
17+
18+
public static final String ENDPOINT_NAME = "state-estimation-orchestrator";
19+
20+
private final ServiceURIsConfig servicesURIsConfig;
21+
22+
public StateEstimationOrchestratorServer(ServiceURIsConfig servicesURIsConfig) {
23+
this.servicesURIsConfig = servicesURIsConfig;
24+
}
25+
26+
@Override
27+
public String getEndpointBaseUri() {
28+
return servicesURIsConfig.getStateEstimationOrchestratorServerBaseUri();
29+
}
30+
31+
@Override
32+
public String getEndpointName() {
33+
return ENDPOINT_NAME;
34+
}
35+
}

src/main/resources/application-local.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ gridsuite:
6464
base-uri: http://localhost:5031
6565
state-estimation-server:
6666
base-uri: http://localhost:5040
67+
state-estimation-orchestrator-server:
68+
base-uri: http://localhost:5041

0 commit comments

Comments
 (0)