Skip to content

Commit 9748fb4

Browse files
committed
refactor
1 parent c36a946 commit 9748fb4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/main/java/de/rwth/idsg/steve/config/OcppConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ public class OcppConfiguration {
4747
@Autowired private ocpp.cs._2015._10.CentralSystemService ocpp16Server;
4848

4949
@Autowired
50-
@Qualifier("FromAddressInterceptor")
51-
private PhaseInterceptor<Message> fromAddressInterceptor;
50+
@Qualifier("MessageHeaderInterceptor")
51+
private PhaseInterceptor<Message> messageHeaderInterceptor;
5252

5353
@PostConstruct
5454
public void init() {
55-
List<Interceptor<? extends Message>> interceptors = asList(new MessageIdInterceptor(), fromAddressInterceptor);
55+
List<Interceptor<? extends Message>> interceptors = asList(new MessageIdInterceptor(), messageHeaderInterceptor);
5656
List<Feature> logging = singletonList(LoggingFeatureProxy.INSTANCE.get());
5757

5858
createOcppService(ocpp12Server, "/CentralSystemServiceOCPP12", interceptors, logging);

src/main/java/de/rwth/idsg/steve/ocpp/soap/FromAddressInterceptor.java renamed to src/main/java/de/rwth/idsg/steve/ocpp/soap/MessageHeaderInterceptor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
* @since 15.06.2015
3838
*/
3939
@Slf4j
40-
@Component("FromAddressInterceptor")
41-
public class FromAddressInterceptor extends AbstractPhaseInterceptor<Message> {
40+
@Component("MessageHeaderInterceptor")
41+
public class MessageHeaderInterceptor extends AbstractPhaseInterceptor<Message> {
4242

4343
@Autowired private OcppServerRepository ocppServerRepository;
4444
@Autowired private ChargePointRepository chargePointRepository;
@@ -47,7 +47,7 @@ public class FromAddressInterceptor extends AbstractPhaseInterceptor<Message> {
4747
private static final String BOOT_OPERATION_NAME = "BootNotification";
4848
private static final String CHARGEBOX_ID_HEADER = "ChargeBoxIdentity";
4949

50-
public FromAddressInterceptor() {
50+
public MessageHeaderInterceptor() {
5151
super(Phase.PRE_INVOKE);
5252
}
5353

src/test/java/de/rwth/idsg/steve/OperationalTestSoapOCPP16.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package de.rwth.idsg.steve;
22

33
import de.rwth.idsg.steve.ocpp.OcppProtocol;
4-
import de.rwth.idsg.steve.ocpp.soap.FromAddressInterceptor;
4+
import de.rwth.idsg.steve.ocpp.soap.MessageHeaderInterceptor;
55
import de.rwth.idsg.steve.ocpp.ws.OcppWebSocketUpgrader;
66
import de.rwth.idsg.steve.repository.ReservationStatus;
77
import de.rwth.idsg.steve.repository.dto.ChargePoint;
@@ -104,7 +104,7 @@ public void testUnregisteredCP() {
104104

105105
/**
106106
* Reason: We started to check registration status by intercepting every SOAP message other than BootNotification
107-
* in {@link FromAddressInterceptor} and throw exception if station is not registered and auto-register is
107+
* in {@link MessageHeaderInterceptor} and throw exception if station is not registered and auto-register is
108108
* disabled (and therefore early-exit the processing pipeline of the message).
109109
*
110110
* In case of BootNotification, the expected behaviour is to set RegistrationStatus.REJECTED in response, as done

0 commit comments

Comments
 (0)