users@websocket-spec.java.net

[jsr356-users] Re: WebSocketContainer.connectToServer

From: Danny Coward <danny.coward_at_oracle.com>
Date: Wed, 16 Jan 2013 16:48:47 -0800

On 1/9/13 10:26 AM, Arun Gupta wrote:
> Danny,
>
>>>
>>> How do I get hooks beforeRequest and afterResponse in this case ?
>> For annotated clients, you can't right now. We could add a
>> configuration attribute so you could intercept it with a
>> *Configuration implementation, but I'm not sure its very common to
>> want to do it for annotated endpoints. Do you ?
> I was thinking more from mirroring the API perspective, don't have a
> good use case for now.

Actually, I thought of one: for integrating with client authentication
schemes, such as BASIC and DIGEST (or others), which we may not support
in the first version out of the box. The POJO would be able to configure
a configuration object that associated, for example, the appropriate
Authorization header.
>>>
>>> Similarly, what if my app wants to rely upon the default
>>> configuration for interface-driven client ? Can we provide an
>>> overloaded method ?
>> You can implement ClientEndpointConfiguration (or subclass
>> DefaultClientConfiguration) and stick it in the relevant
>> connectToServer() method.
> Do you expect any other usage of ClientEndpointConfiguration interface
> ? Would the default class be enough ?
Well, one case might be to be able to get at some shared database
connection (or other shared resource) for client endpoints.

>
> Should the class be called DefaultClientEndpointConfiguration instead
> ? I know the name is fairly long but was wondering if that was considered.
It is more logical and longer. We'll look at some of the renaming issues
in the next week or so.

- Danny
>
> Arun
>
>>
>> HTH,
>>
>> - Danny
>>
>>>
>>> Thanks,
>>> Arun
>>>
>>
>>
>> --
>> <http://www.oracle.com> *Danny Coward *
>> Java EE
>> Oracle Corporation
>>
>
> --
> http://twitter.com/arungupta
> http://blogs.oracle.com/arungupta


-- 
<http://www.oracle.com> 	*Danny Coward *
Java EE
Oracle Corporation