// stringToByteBuffer -> byteBufferToArray -> dummyTraffic ->
// array sequence -> channelWriter
ByteBufferArraySequenceForwarder byteBufferArraySequenceForwarder =
new ByteBufferArraySequenceForwarder();
byteBufferArraySequenceForwarder.setNextForwarder(channelWriter);
DummyTrafficOutputForwarder dummyTrafficOutputTransformer =
new DummyTrafficOutputForwarder(2);
trafficShaperCoordinator = new TrafficShaperCoordinator(
Executors.newSingleThreadScheduledExecutor(),
Speed.SLOW.getPackageSize(), Speed.SLOW.getDelay(), false);
trafficShaperCoordinator.addTrafficShaper(
this, dummyTrafficOutputTransformer);
dummyTrafficOutputTransformer.setNextForwarder(
byteBufferArraySequenceForwarder);
ByteBufferToArrayTransformer byteBufferToArrayTransformer =
new ByteBufferToArrayTransformer();
byteBufferToArrayTransformer.setNextForwarder(
dummyTrafficOutputTransformer);