Hi Arun,
On 1/8/13 2:12 PM, Arun Gupta wrote:
> How do you expect a typical implementation of
> Set<Class>
> ServerApplicationConfiguration.getAnnotatedEndpointClasses(Set<Class>)
> to look like ?
Something like:-
public Set<Class>
ServerApplicationConfiguration.getAnnotatedEndpointClasses(Set<Class>
scannedOnes) {
Set onesIWantToDeploy = new HashSet();
for (Class next : scannedOnes) {
if (doIReallyWantThisOneAfterAll(next)) {
onesIWantToDeploy.add(next);
}
}
return onesIWantToDeploy;
}
>
> Seems like the parameter will already contain the list of classes
> annotated with @WebSocketEndpoint ?
Yes, they are the result of the scan for annotated endpoints.
>
> Is the expectation that interface-driven endpoints will be added to
> this set and returned back ?
No, they are scanned for separately, and passed into
getEndpointConfigurationClasses(), or more precisely, their endpoint
configurations are scanned for and passed into that method.
>
> What if I do not include @WebSocketEndpoint in the list ? Are those
> endpoints then not deployed by the server ?
Correct, the ones you return out of these methods are deployed, which
may not be all of them.
>
> Is there a mechanism to provide configuration across all the endpoints
> - annotation or interface-driven ?
What kind of configuration ? If you want some kind of global thing they
all hook up to, then you can subclass/implement your own *Configuration
class with a getGlobalThing() method on it if you like, except for the
annotated client case (see last email).
HTH,
- Danny
>
> Arun
>
--
<http://www.oracle.com> *Danny Coward *
Java EE
Oracle Corporation