com.mysql.cj.callback

## Interface MysqlCallbackHandler

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface MysqlCallbackHandler

A functional interface for implementing callback handlers. The single method `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

All Methods Instance Methods Abstract Methods
`void` `handle(MysqlCallback cb)` Exchanges information between the caller of this method and the owner of the `MysqlCallbackHandler` instance.

### Method Detail

#### handle

    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` - the `MysqlCallback` to process

Copyright © 2016, 2023, Oracle and/or its affiliates.