Hey Arun,
On 1/8/13 1:52 PM, Arun Gupta wrote:
> WebSocket client can be configured for an interface-driven endpoint
> using:
>
> connectToServer(Class<? extends Endpoint>,
> ClientEndpointConfiguration, URI).
>
> For annotation-driven endpoint, subprotocols can be configured using
> the annotation. How can extensions be configured ?
There's an RFE to add an extensions attribute to @WebSocketEndpoint and
@WebSocketClient.
>
> 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 ?
>
> 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.
HTH,
- Danny
>
> Thanks,
> Arun
>
--
<http://www.oracle.com> *Danny Coward *
Java EE
Oracle Corporation