ByteBufferForwardingMode.DIRECT);
trafficShaperCoordinator = new TrafficShaperCoordinator(
Executors.newSingleThreadScheduledExecutor(), 1, 1000, false);
trafficShaperCoordinator.addTrafficShaper(this, bufferTransformer);
bufferTransformer.setNextForwarder(channelWriter);
FramingOutputTransformer framingOutputTransformer =
new FramingOutputTransformer(
FRAMING_HEADER_SIZE, ByteBufferForwardingMode.DIRECT);
framingOutputTransformer.setNextForwarder(bufferTransformer);
ByteBufferToArrayTransformer byteBufferToArrayTransformer =
new ByteBufferToArrayTransformer();
byteBufferToArrayTransformer.setNextForwarder(
framingOutputTransformer);
StringToByteBufferTransformer stringToByteBufferTransformer =