Top Description Methods
com.mysql.cj.callback

public Interface MysqlCallbackHandler

Known Direct Implementers
com.mysql.cj.callback.OpenidConnectIdTokenFromFileCallbackHandler
Annotations
@FunctionalInterface

A functional interface for implementing callback handlers. The single method MysqlCallbackHandler#handle(MysqlCallback) is called by the classes where the callback handler is passed when they need to share data with the caller. The kind of data to exchange depends on the implementations of MysqlCallback they choose to use.

Method Summary

Modifier and TypeMethod and Description
public void
handle(MysqlCallback
the MysqlCallback to process
cb
)

Exchanges information between the caller of this method and the owner of the MysqlCallbackHandler instance.

Method Detail

handleback to summary
public void handle(MysqlCallback cb)

Exchanges information between the caller of this method and the owner of the MysqlCallbackHandler instance. The method can be called multiple times with different callback implementations to exchange different types of information. A typical MysqlCallbackHandler implementation looks like:


private MysqlCallbackHandler callbackHandler = (cb) -> {
    if (cb instanceof UsernameCallback) {
        this.username = ((UsernameCallback) cb).getUsername();
    }
};
Parameters
cb:MysqlCallback

the MysqlCallback to process