WebSocketMapping Refactor - add javadoc for WebSocketComponents

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2019-01-30 14:02:50 +11:00
parent deaaa0bf30
commit 78dc801153
1 changed files with 7 additions and 0 deletions

View File

@ -25,6 +25,13 @@ import org.eclipse.jetty.io.MappedByteBufferPool;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.util.DecoratedObjectFactory;
/**
* A collection of components which are the resources needed for websockets such as
* {@link ByteBufferPool}, {@link WebSocketExtensionRegistry}, and {@link DecoratedObjectFactory}.
*
* These components should be accessed through {@link WebSocketComponents#ensureWebSocketComponents} so that
* the instance can be shared by being stored as a bean on the ContextHandler.
*/
public class WebSocketComponents
{
public static WebSocketComponents ensureWebSocketComponents(ServletContext servletContext)