Skip to content

3.8.5 Deprecations and breaking changes

Paulo Lopes edited this page Jan 29, 2020 · 3 revisions

Vert.x Core

HTTP client request connection handler

The HttpClientRequest#connectionHandler is removed in Vert.x 4 and deprecated in 3.x (see https://github.com/eclipse-vertx/vert.x/issues/3211).

Application can instead rely on the HttpClient#connectionHandler to achieve the same:

// Deprecated
client.request().connectionHandler(conn -> {
  // Do something with connection
}).end();

// Instead do
client.connectionHandler(conn -> {
  // Do something with connection
});

WebSocket deprecations

Vert.x 3.x provides an inconsistent naming concerning for WebSocket, it is often spelled as Websocket. We should address this in Vert.x 4 whenever possible and provide deprecation for incorrect names.

In 3.x we provide deprecations along with correctly spelled equivalents:

  • HttpServerOptions properties
    • spelling fixes, e.g getMaxWebsocketFrameSize renamed to getMaxWebSocketFrameSize
    • the fixed sub-protocols uses now List<String> instead of a coma separated string
  • HttpClientOptions properties spelling fixes, e.g getMaxWebsocketFrameSize renamed to getMaxWebSocketFrameSize
  • HttpServer handlers (websocketHandler, websocketStream)
  • WebsocketRejectedException is deprecated and now extends the more generic UpgradeRejectedException

Vert.x Mongo Client

Creating a non shared client

MongoClient#createNonShared method is deprecated in favor of MongoClient#create for consistency with all other Vert.x APIs.

Vert.x JDBC Client

Creating a non shared client

JDBCClient#createNonShared method is deprecated in favor of JDBCClient#create for consistency with all other Vert.x APIs.

Vert.x Cassandra Client

Creating a non shared client

CassandraClient#createNonShared methods are deprecated in favor of CassandraClient#create for consistency with all other Vert.x APIs.

Vert.x Mail Client

Creating a non shared client

MailClient#createNonShared method is deprecated in favor of MailClient#create for consistency with all other Vert.x APIs.

Vert.x Auth

  • AbstractUser
  • PubSecKeyOptions.{getPublicKey,setPublicKey,getSecretKey,setSecretKey,isSymmetric,setSymmetric,setCertificate}
  • User.isAuthorized(String, Handler)
  • User.clearCache()
  • User.setAuthProvider()
  • AuthProviderInternal
  • JDBCAuthOptions
  • JDBCHashStrategy
  • AccessToken
  • KeycloakHelper
  • Oauth2Auth.introspectToken()
  • Oauth2Auth.getFlowType()
  • Oauth2Auth.loadJWK(Handler)
  • Oauth2Auth.rbacHandler()
  • Oauth2ClientOptions.{isUseBasicAuthorization(),setUseBasicAuthorizationHeader(),getScopeSeparator(),setScopeSeparator()}
  • ShiroAuth

All these classes/methods have been deprecated as they will be removed on 4.0. Note however that functionality will not be always removed but replaced with a newer API, that shall be on 4.0 only.

These deprecations are warnings to what will happen soon and removals are only related to API streamlining (more than 1 way to achieve the same result).

Clone this wiki locally