tyrus
tyrus copied to clipboard
Multiple text decoders
I seem to be getting Text MessageHandler already registered when trying to register multiple JSON decoders for multiple types of POJOs. Shouldn't it be possible to register multiple types of decoders for the same type, considering there is Boolean willDecode(String) method in Decoder.Text<T> interface?
For example:
void onOpen(Session session)
{
session.addMessageHandler(GatewayHello.class, this::onHello);
session.addMessageHandler(GatewayAck.class, this::onGatewayAck);
session.addMessageHandler(GatewayInvalid.class, this::onGatewayInvalid);
}
void onHello(GatewayHello request)
{
}
void onGatewayAck(GatewayAck request)
{
}
void onGatewayInvalid(GatewayInvalid request)
{
}
And in @ClientEndpoint annotation
@ClientEndpoint(
decoders = {HelloDecoder.class, AckDecoder.class, InvalidDecoder.class}
)
- Issue Imported From: https://github.com/tyrus-project/tyrus/issues/619
- Original Issue Raised By:@Dragas
- Original Issue Assigned To: Unassigned