code: public static WebSocketContainer getWebSocketContainer() {
          if(System.getSecurityManager() == null) {
              return getWebSocketContainerImpl();
          } else {
              return AccessController.doPrivileged(new PrivilegedAction<WebSocketContainer>() {
                  @Override
                  public WebSocketContainer run() {
                      return getWebSocketContainerImpl();
                  }
              });
          }
      }
docs: Obtain a new instance of a WebSocketContainer. The method looks for the
  ContainerProvider implementation class in the order listed in the META-INF/services/javax.websocket.ContainerProvider
  file, returning the WebSocketContainer implementation from the ContainerProvider implementation
  that is not {@code null}.
  @return an implementation provided instance of type WebSocketContainer