com.mysql.cj.callback

## Class UsernameCallback

- java.lang.Object
- - com.mysql.cj.callback.UsernameCallback

All Implemented Interfaces:
  MysqlCallback

    public class UsernameCallback
    extends Object
    implements MysqlCallback

A callback that can be used to exchange username information to a callback handler owner.

### Field Summary

Fields
`private String` `username`

### Constructor Summary

Constructors
Constructor and Description
`UsernameCallback(String username)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getUsername()` Get the username provided by the caller of `MysqlCallbackHandler.handle(MysqlCallback)`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### username

    private String username

### Constructor Detail

#### UsernameCallback

    public UsernameCallback(String username)

### Method Detail

#### getUsername

    public String getUsername()

Get the username provided by the caller of `MysqlCallbackHandler.handle(MysqlCallback)`.

Returns:
  the username to pass over to the callback handler.

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