Hi,
I have some questions:
In javax.websocket.ServerContainer javadoc (Draft v008), there was the method
void publishServer(Endpoint endpoint, ServerEndpointConfiguration ilc).
So, MyServer was able to publish the same endpoint type to many different
paths:
serverContainer.publishServer(new MyApplication(config1), new
DefaultServerConfiguration(new URI("/context1"));
serverContainer.publishServer(new MyApplication(config2), new
DefaultServerConfiguration(new URI("/context2"));
... (repeated dynamically many times as needed, and each context had their
different shared resources/connected users).
But after code revision 49 (TYRUS-37 one endpoint instance per peer), the
publish method is defined as:
void publishServer(Class<? extends Endpoint> endpointClazz) throws
DeploymentException;
Then, how could the same programmatic endpoint be published to many different
paths?
It seems that an instance would be auto-created (without
constructor/configuration), so the method "getEndpointConfiguration" can only
return 1 fixed EndpointConfiguration object.
I suppose it should be a ServerEndpointConfiguration instance, but will the
endpoint be mapped only to "getPath" URI? or it will be dynamically mapped to
all URIs that the users will try to connect and the "matchURI" method returns
"true"?
Then, maybe the the "publishServer" should return the "EndpointConfiguration"
object created by the Container during publishing of the Endpoint class...
(so my MyNewEndpointPerPeer class could return a
CustomServerEndpointConfiguration that allows adding/removing new context URIs,
and MyServer could use it to dynamically manage the URIs).
By other side, how can I share state between endpoint/client instances of the
same context? there will be any WebSocketContext class like in ASP.NET 4.5?
(static variables aren't apropiate, because I don't want to share/synchronize
resources with other context URIs).
Thanks you in advance.