Package org.flywaydb.core.api.callback

## Interface Context

-     public interface Context

  The context relevant to an event.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Configuration` | `getConfiguration()` |
    `java.sql.Connection` | `getConnection()` |
    `MigrationInfo` | `getMigrationInfo()` |
    `OperationResult` | `getOperationResult()` |
    `Statement` | `getStatement()` |

- - ### Method Detail

    - #### getConfiguration

          Configuration getConfiguration()

      Returns:
        The configuration currently in use.

    - #### getConnection

          java.sql.Connection getConnection()

      Returns:
        The JDBC connection being used. Transaction are managed by Flyway. When the context is passed to the `Callback.handle(Event, Context)` method, a transaction will already have been started if required and will be automatically committed or rolled back afterwards.

    - #### getMigrationInfo

          MigrationInfo getMigrationInfo()

      Returns:
        The info about the migration being handled. Only relevant for the BEFORE_EACH_* and AFTER_EACH_* events. `null` in all other cases.

    - #### getStatement

          Statement getStatement()

      Returns:
        The info about the statement being handled. Only relevant for the statement-level events. `null` in all other cases.

        Flyway Teams only

    - #### getOperationResult

          OperationResult getOperationResult()

      Returns:
        The OperationResult object for the finished operation. Only relevant for the AFTER_*_OPERATION_FINISH events.