ErrorGeneratingFilter.java | Class | An
IoFilter implementation generating random bytes and PDU modification in
your communication streams.
It's quite simple to use :
ErrorGeneratingFilter egf = new ErrorGeneratingFilter();
For activate the change of some bytes in your
IoBuffer , for a probability of 200 out
of 1000
IoBuffer processed :
egf.setChangeByteProbability(200);
For activate the insertion of some bytes in your
IoBuffer , for a
probability of 200 out of 1000 :
egf.setInsertByteProbability(200);
And for the removing of some bytes :
egf.setRemoveByteProbability(200);
You can activate the error generation for write or read with the
following methods :
egf.setManipulateReads(true);
egf.setManipulateWrites(true);
author: The Apache MINA Project (dev@mina.apache.org) version: $Rev: 612456 $, $Date: 2008-01-16 14:49:47 +0100 (mer., 16 janv. |