Fixed Node subscription
This commit is contained in:
parent
22369d7b70
commit
bd5c5f1a98
@ -1,9 +1,11 @@
|
||||
package cz.cvut.fel.sit.omo.foodchain.factory;
|
||||
|
||||
import cz.cvut.fel.sit.omo.foodchain.FoodChain;
|
||||
import cz.cvut.fel.sit.omo.foodchain.channel.ChannelSubscriptionType;
|
||||
import cz.cvut.fel.sit.omo.foodchain.node.*;
|
||||
import cz.cvut.fel.sit.omo.foodchain.parser.ParserResultElement;
|
||||
import cz.cvut.fel.sit.omo.foodchain.pool.ChannelPool;
|
||||
import cz.cvut.fel.sit.omo.foodchain.product.ProductType;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@ -68,8 +70,10 @@ public class NodeFactory
|
||||
|
||||
for (String s : subs)
|
||||
{
|
||||
String[] el = s.split(" ");
|
||||
|
||||
ChannelPool temp = FoodChain.getFactoryManager().getPoolDatabaseInstance().getChannelPoolInstance();
|
||||
// n.subscribeToChannel(temp.findByType(s)); //TODO String to enum
|
||||
n.subscribeToChannel(temp.findByType(ProductType.valueOf(el[0])), ChannelSubscriptionType.valueOf(el[1]));
|
||||
}
|
||||
|
||||
return n;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user