use of com.robo4j.StringProducerRemote in project robo4j by Robo4J.
the class RemoteContextTests method buildEmitterContext.
private <T> RoboContext buildEmitterContext(Class<T> clazz, String target, String unitName) throws Exception {
RoboBuilder builder = new RoboBuilder(SystemUtil.getInputStreamByResourceName("testMessageEmitterSystem_8.xml"));
if (clazz.equals(String.class)) {
StringProducerRemote<T> remoteTestMessageProducer = new StringProducerRemote<>(clazz, builder.getContext(), unitName);
remoteTestMessageProducer.initialize(getEmitterConfiguration(REMOTE_CONTEXT_RECEIVER, target));
builder.add(remoteTestMessageProducer);
}
if (clazz.equals(TestMessageType.class)) {
RemoteTestMessageProducer remoteTestMessageProducer = new RemoteTestMessageProducer(builder.getContext(), unitName);
remoteTestMessageProducer.initialize(getEmitterConfiguration(REMOTE_CONTEXT_RECEIVER, target));
builder.add(remoteTestMessageProducer);
}
return builder.build();
}
Aggregations