Chapter 3. Features

3.1. New and Changed features

No new features or functionalities are introduced in this release.

3.2. Deprecated features

3.2.1. New connection handler method

The HttpClientRequest.connectionHandler() method is deprecated and will be removed in a future release. Use HttpClient.connectionHandler() method instead to call connection handlers for client requests in your application. For example, use the following code to work with HttpClient.connectionHandler() method:

client.connectionHandler(conn -> {
	// Connection related code
});

3.2.2. Updates in HTTP Methods for WebSocket

The updates in the HTTP methods for WebSocket are:

  • The usage of the term WebSocket in method names was inconsistent. The method names had incorrect capitalization, for example, WebSocket, instead of WebSocket. The methods that had inconsistent usage of WebSocket in the following classes have been deprecated and will be removed in a future release. Use the new methods that have correct capitalization instead.

    • The following methods in HttpServerOptions class are deprecated.

      Deprecated MethodsNew Methods

      getMaxWebsocketFrameSize()

      getMaxWebSocketFrameSize()

      setMaxWebsocketFrameSize()

      setMaxWebSocketFrameSize()

      getMaxWebsocketMessageSize()

      getMaxWebSocketMessageSize()

      setMaxWebsocketMessageSize()

      setMaxWebSocketMessageSize()

      getPerFrameWebsocketCompressionSupported()

      getPerFrameWebSocketCompressionSupported()

      setPerFrameWebsocketCompressionSupported()

      setPerFrameWebSocketCompressionSupported()

      getPerMessageWebsocketCompressionSupported()

      getPerMessageWebSocketCompressionSupported()

      setPerMessageWebsocketCompressionSupported()

      setPerMessageWebSocketCompressionSupported()

      getWebsocketAllowServerNoContext()

      getWebSocketAllowServerNoContext()

      setWebsocketAllowServerNoContext()

      setWebSocketAllowServerNoContext()

      getWebsocketCompressionLevel()

      getWebSocketCompressionLevel()

      setWebsocketCompressionLevel()

      setWebSocketCompressionLevel()

      getWebsocketPreferredClientNoContext()

      getWebSocketPreferredClientNoContext()

      setWebsocketPreferredClientNoContext()

      setWebSocketPreferredClientNoContext()

      getWebsocketSubProtocols()

      getWebSocketSubProtocols()

      setWebsocketSubProtocols()

      setWebSocketSubProtocols()

      The new methods for WebSocket subprotocols use List<String> data type instead of a comma separated string to store items.

    • The following methods in HttpClientOptions class are deprecated.

      Deprecated MethodsNew Methods

      getTryUsePerMessageWebsocketCompression()

      getTryUsePerMessageWebSocketCompression()

      setTryUsePerMessageWebsocketCompression()

      setTryUsePerMessageWebSocketCompression()

      getTryWebsocketDeflateFrameCompression()

      getTryWebSocketDeflateFrameCompression()

      getWebsocketCompressionAllowClientNoContext()

      getWebSocketCompressionAllowClientNoContext()

      setWebsocketCompressionAllowClientNoContext()

      setWebSocketCompressionAllowClientNoContext()

      getWebsocketCompressionLevel()

      getWebSocketCompressionLevel()

      setWebsocketCompressionLevel()

      setWebSocketCompressionLevel()

      getWebsocketCompressionRequestServerNoContext()

      getWebSocketCompressionRequestServerNoContext()

      setWebsocketCompressionRequestServerNoContext()

      setWebSocketCompressionRequestServerNoContext()

    • The following handler methods in HttpServer class are deprecated.

      Deprecated MethodsNew Methods

      websocketHandler()

      webSocketHandler()

      websocketStream()

      webSocketStream()

  • WebsocketRejectedException is deprecated. The methods will throw the UpgradeRejectedException instead.

3.2.3. Deprecated authentication and authorization classes and methods

The following authentication and authorization classes and methods are deprecated and will be replaced in a future release.

  • Classes:

    • AbstractUser
    • PubSecKeyOptions
    • JDBCAuthOptions
    • JDBCHashStrategy
    • AccessToken
    • KeycloakHelper
    • ShiroAuth
    • AuthProviderInternal
  • Methods:

    • User.isAuthorized()
    • User.clearCache()
    • User.setAuthProvider()
    • Oauth2Auth.introspectToken()
    • Oauth2Auth.getFlowType()
    • Oauth2Auth.loadJWK()
    • Oauth2Auth.rbacHandler()
    • Oauth2ClientOptions.isUseBasicAuthorization()
    • Oauth2ClientOptions.setUseBasicAuthorizationHeader()
    • Oauth2ClientOptions.getScopeSeparator()
    • Oauth2ClientOptions.setScopeSeparator()

3.2.4. Methods to create clients that have no shared data sources

Use the following new methods to create clients that do not have shared data sources with other clients. These methods maintain their own data sources.

Deprecated MethodsNew Methods

MongoClient.WebsocketRejectedExceptioncreateNonShared()

MongoClient.create()

JDBCClient.createNonShared()

wJDBCClient.create()

CassandraClient.createNonShared()

CassandraClient.create()

MailClient.createNonShared()

MailClient.create()