So I am building an Akka custom component to learn the framework. I need to create a UnifromFanOut shape custom component. So I tried to extend the shape but the issue is how do I create the shape with 1 input and 3 outputs. The class requires a seq object which is a part of Scala but I am a bit confused on whether the whole shape itself is correct. I just started learning Akka so I can understand if my approach is wrong. Also I the purpose of the exercise was to create a custom component and I know I can get the logic done through GraphDSL but it needs to be a custom component. My question is how do I create this shape correctly. (the documentation isn't the best for custom components)
public final Inlet<DeviceInfo> in = Inlet.create("Map.in");
public final Outlet<DeviceInfo> temp_out = Outlet.create("Map.out");
public final Outlet<DeviceInfo> humidity_out = Outlet.create("Map.out");
public final Outlet<DeviceInfo> illumination_out = Outlet.create("Map.out");
//Does not work
private final UniformFanOutShape<DeviceInfo, DeviceInfo> shape = UniformFanOutShape.apply(in, Arrays.asList(temp_out, humidity_out));
@Override
public UniformFanOutShape<DeviceInfo, DeviceInfo> shape() {
return shape;
}