More:
After I registered the encoder as such in Factory:
  public SBProtocolReg() {
        // Registers known message encoders and decoders.
        register(new SBDecoder());
        register(new SBPongEncoder());
    }

I added a debug to the encoder (System.out) and it never outputs, which means that it's not getting called.

Also my getMessage types returns null for now.

Why is the encode method not firing?

.V


MessageEncoder can encode. In your case:

public Set getMessageTypes()
{
    Set types = new HashSet();
    types.add( Pong.class );
    return types;
}

HTH




What does Pong class have in it?


Reply via email to