Search in sources :

Example 1 with MediatorInInterceptor

use of de.rwth.idsg.steve.ocpp.soap.MediatorInInterceptor in project steve by RWTH-i5-IDSG.

the class OcppConfiguration method init.

@PostConstruct
public void init() {
    List<Interceptor<? extends Message>> interceptors = asList(new MessageIdInterceptor(), fromAddressInterceptor);
    List<Feature> logging = singletonList(LoggingFeatureProxy.INSTANCE.get());
    createOcppService(ocpp12Server, "/CentralSystemServiceOCPP12", interceptors, logging);
    createOcppService(ocpp15Server, "/CentralSystemServiceOCPP15", interceptors, logging);
    createOcppService(ocpp16Server, "/CentralSystemServiceOCPP16", interceptors, logging);
    // Just a dummy service to route incoming messages to the appropriate service version. This should be the last
    // one to be created, since in MediatorInInterceptor we go over created/registered services and build a map.
    // 
    List<Interceptor<? extends Message>> mediator = singletonList(new MediatorInInterceptor(springBus()));
    createOcppService(ocpp12Server, CONFIG.getRouterEndpointPath(), mediator, Collections.emptyList());
}
Also used : Message(org.apache.cxf.message.Message) MessageIdInterceptor(de.rwth.idsg.steve.ocpp.soap.MessageIdInterceptor) MediatorInInterceptor(de.rwth.idsg.steve.ocpp.soap.MediatorInInterceptor) MessageIdInterceptor(de.rwth.idsg.steve.ocpp.soap.MessageIdInterceptor) Interceptor(org.apache.cxf.interceptor.Interceptor) PhaseInterceptor(org.apache.cxf.phase.PhaseInterceptor) MediatorInInterceptor(de.rwth.idsg.steve.ocpp.soap.MediatorInInterceptor) Feature(org.apache.cxf.feature.Feature) PostConstruct(javax.annotation.PostConstruct)

Aggregations

MediatorInInterceptor (de.rwth.idsg.steve.ocpp.soap.MediatorInInterceptor)1 MessageIdInterceptor (de.rwth.idsg.steve.ocpp.soap.MessageIdInterceptor)1 PostConstruct (javax.annotation.PostConstruct)1 Feature (org.apache.cxf.feature.Feature)1 Interceptor (org.apache.cxf.interceptor.Interceptor)1 Message (org.apache.cxf.message.Message)1 PhaseInterceptor (org.apache.cxf.phase.PhaseInterceptor)1