title: How to initialize a WebSocket Endpoint with constructor parameters
body: <p>I am using <code>javax.websocket.*</code> API right now but I don't know how to initialize an <code>Endpoint</code> with some constructor parameters after searching on the Internet.</p>
  
  <pre><code>ServerContainer container = WebSocketServerContainerInitializer.configureContext(context); //jetty
  container.addEndpoint(MyWebSocketEndpoint.class);
  </code></pre>
  
  <p>I want pass through some parameters when initializing <code>MyWebSocketEndpoint</code> then I can use the parameter, say <code>clientQueue</code>, in my <code>onOpen</code> method doing something like:</p>
  
  <pre><code>clientQueue.add(new Client(session));
  </code></pre>