Please try to create a new ProtocolDecoder which wraps two decoders you
implemented, and switches them with a method call:
public SwitchingProtocolDecoder implements ProtocolDecoder {
private boolean useDecoderB;
private final ProtocolDecoder decoderA = ...;
private final ProtocolDecoder decoderB = ...;
public void decode(...) {
if (useDecoderB) {
decoderB.decode(...);
} else {
decoderA.decode(...);
}
}
}
Actually we're going to provide this kind of switch soon...
Thanks,
Trustin
On 5/15/06, Tyler Pitchford <[EMAIL PROTECTED]> wrote:
RECEIVED: DirectBuffer[pos=0 lim=6 cap=8192: 00 00 00 02 05 FE]
It seems like you inserted a LoggingFilter. Am I correct? Were there any
logged exceptions then?
Which is the message I'm expecting. However, if I do the addFirst,
then I get no log printout. I've run Ethereal to check if the packets
I'm looking for are being sent and it's definitely sending the packet
to me, but it's not always being picked up by MINA, that's for sure.
It's very spotty if the message is received (changing of filters or
not).
Do you mean that you didn't get any messages or exceptions even when you
didn't remove nor add a codec? What happens if you don't change the codec
and encounter a unknown data?
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6