SMTPConnection clean up
gaol opened this issue · 0 comments
gaol commented
Code clean up
- 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.
private Handler<String> commandReplyHandler;
private Handler<Throwable> errorHandler;
- The
Handler<String> initialReplyHandler
should be updated toHandler<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 tovoid write(String str, Handler<AsyncResult<String>> commandResultHandler)
Overall any operation that has an Handler<T>
should be Handler<AsyncResult<T>>