users@tyrus.java.net

DefaultClientEndpointConfiguration

From: Max Bureck <maxbureck_at_arcor.de>
Date: Sun, 06 Jan 2013 16:57:59 +0100

Hello,

I just started to play around with Tyrus and I created a JSON encoder
and decoder based on Jackson. Now I try to connect to the server using
the client library, unfortunately I cannot use
DefaultClientEndpointConfiguration.Builder to create an
EndpointConfiguration with the encoder, because the method
encoders(List<Encoder> encoders) is defined in the superclass
DefaultEndpointConfiguration.Builder which is protected. I guess this is
not how it is supposed to work. For now I just create my own anonymous
class EndpointConfiguration instance.

And by the way, I had a look at the last released version of the
standard document and in the section on @WebSocketMessage page 24 it says:

"The method may have a non-void return type, in which case the web
socket runtime
must interpret this as a web socket message to return to the peer. The
allowed data
types for this return type, other than void, are
- String, ByteBuffer, byte[], any java primitive or class equivalent and
anything
for which there is a decoder."

Shouldn't the last word be "encoder"? Maybe this was already corrected
in a newer version of the document.

Best Regard,
Max