Search in sources :

Example 1 with ConnectRequestDto

use of org.opensmartgridplatform.dto.da.ConnectRequestDto in project open-smart-grid-platform by OSGP.

the class OsgpCoreRequestSteps method whenIReceiveAConnectRequestForIEC60870DeviceFromOsgpCore.

@When("I receive a connect request for IEC60870 device {string} from osgp core")
public void whenIReceiveAConnectRequestForIEC60870DeviceFromOsgpCore(final String deviceIdentification) throws Exception {
    this.connectionSteps.prepareForConnect(deviceIdentification);
    final ObjectMessage message = new ObjectMessageBuilder().withDeviceIdentification(deviceIdentification).withMessageType(MessageType.CONNECT.name()).withObject(new ConnectRequestDto()).build();
    this.messageListener.onMessage(message);
}
Also used : ObjectMessage(javax.jms.ObjectMessage) ObjectMessageBuilder(org.opensmartgridplatform.shared.infra.jms.ObjectMessageBuilder) ConnectRequestDto(org.opensmartgridplatform.dto.da.ConnectRequestDto) When(io.cucumber.java.en.When)

Example 2 with ConnectRequestDto

use of org.opensmartgridplatform.dto.da.ConnectRequestDto in project open-smart-grid-platform by OSGP.

the class OsgpCoreRequestSteps method whenIReceiveAGetLightSensorStatusRequestMessageForIEC60870DeviceFromOsgpCore.

@When("I receive a get light sensor status request message for IEC60870 device {string} from osgp core")
public void whenIReceiveAGetLightSensorStatusRequestMessageForIEC60870DeviceFromOsgpCore(final String deviceIdentification) throws Exception {
    this.connectionSteps.prepareForConnect(deviceIdentification);
    final ObjectMessage message = new ObjectMessageBuilder().withDeviceIdentification(deviceIdentification).withMessageType(MessageType.GET_LIGHT_SENSOR_STATUS.name()).withObject(new ConnectRequestDto()).build();
    this.messageListener.onMessage(message);
}
Also used : ObjectMessage(javax.jms.ObjectMessage) ObjectMessageBuilder(org.opensmartgridplatform.shared.infra.jms.ObjectMessageBuilder) ConnectRequestDto(org.opensmartgridplatform.dto.da.ConnectRequestDto) When(io.cucumber.java.en.When)

Aggregations

When (io.cucumber.java.en.When)2 ObjectMessage (javax.jms.ObjectMessage)2 ConnectRequestDto (org.opensmartgridplatform.dto.da.ConnectRequestDto)2 ObjectMessageBuilder (org.opensmartgridplatform.shared.infra.jms.ObjectMessageBuilder)2