Search in sources :

Example 1 with MessageSenderMultiplexer

use of me.retrodaredevil.solarthing.message.MessageSenderMultiplexer in project solarthing by wildmountainfarms.

the class MessageSenderActionNode method getMessageSenderFrom.

private MessageSender getMessageSenderFrom(MessageEventNode messageEventNode) {
    List<MessageSender> messageSenders = new ArrayList<>();
    for (String senderName : messageEventNode.getSendTo()) {
        MessageSender sender = messageSenderMap.get(senderName);
        if (sender == null) {
            throw new IllegalArgumentException("senderName: " + senderName + " is not defined!");
        }
        messageSenders.add(sender);
    }
    return new MessageSenderMultiplexer(messageSenders);
}
Also used : MessageSender(me.retrodaredevil.solarthing.message.MessageSender) ArrayList(java.util.ArrayList) MessageSenderMultiplexer(me.retrodaredevil.solarthing.message.MessageSenderMultiplexer)

Aggregations

ArrayList (java.util.ArrayList)1 MessageSender (me.retrodaredevil.solarthing.message.MessageSender)1 MessageSenderMultiplexer (me.retrodaredevil.solarthing.message.MessageSenderMultiplexer)1