接口 MysqlCallbackHandler
-
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface MysqlCallbackHandler
A functional interface for implementing callback handlers. The single methodhandle(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 ofMysqlCallbackthey choose to use.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidhandle(MysqlCallback cb)Exchanges information between the caller of this method and the owner of theMysqlCallbackHandlerinstance.
-
-
-
方法详细资料
-
handle
void handle(MysqlCallback cb)
Exchanges information between the caller of this method and the owner of theMysqlCallbackHandlerinstance. The method can be called multiple times with different callback implementations to exchange different types of information. A typicalMysqlCallbackHandlerimplementation looks like:private MysqlCallbackHandler callbackHandler = (cb) -> { if (cb instanceof UsernameCallback) { this.username = ((UsernameCallback) cb).getUsername(); } };- 参数:
cb-
-
-