code: private void register(WebSocketWireProtocol wireProtocolVersion, WsHandshakeValidator validator) {
          if ( wireProtocolVersion == null ) {
              throw new NullPointerException("wireProtocolVersion");
          }
          if ( validator == null ) {
              throw new NullPointerException("validator");
          }
  
          WsHandshakeValidator existingValidator =
                  handshakeValidatorsByWireProtocolVersion.put(wireProtocolVersion, validator);
  
          logger.trace("Class "+validator.getClass().getName()+" registered to support websocket handshake for protocol "+wireProtocolVersion);
          if ( existingValidator != null ) {
              logger.trace("Multiple handshake validators have registered to support wire protocol "+wireProtocolVersion+". Using class "+this.getClass().getName()+'.');
          }
      }
docs: Allow subclasses to register themselves as validators for specific versions of
  the wire protocol.
  
  @param wireProtocolVersion the version of the protocol
  @param validator the validator