The following handlers are used in SMTPConnection to handle success response and error, they should be changed to Handler<AsyncResult<String>> handler instead. The implementation in vertx-mqtt-client can be referenced.
The Handler<String> initialReplyHandler should be updated to Handler<AsyncResult<String>> initialReplyHandler
void init(Handler<String> initialReplyHandler)
The private Handler<Throwable> errorHandler should be removed
The void write(String str, Handler<String> commandResultHandler) should be changed to void write(String str, Handler<AsyncResult<String>> commandResultHandler)
Overall any operation that has an Handler<T> should be Handler<AsyncResult<T>>
Code clean up
Handler<AsyncResult<String>> handler
instead. The implementation in vertx-mqtt-client can be referenced.Handler<String> initialReplyHandler
should be updated toHandler<AsyncResult<String>> initialReplyHandler
private Handler<Throwable> errorHandler
should be removedvoid write(String str, Handler<String> commandResultHandler)
should be changed tovoid write(String str, Handler<AsyncResult<String>> commandResultHandler)
Overall any operation that has an
Handler<T>
should beHandler<AsyncResult<T>>