com.github.shyiko.mysql.binlog
Interface BinaryLogClient.LifecycleListener

All Known Implementing Classes:
BinaryLogClient.AbstractLifecycleListener, BinaryLogClientStatistics
Enclosing class:
BinaryLogClient

public static interface BinaryLogClient.LifecycleListener

BinaryLogClient's lifecycle listener.


Method Summary
 void onCommunicationFailure(BinaryLogClient client, Exception ex)
          It's guarantied to be called before onDisconnect(BinaryLogClient)) in case of communication failure.
 void onConnect(BinaryLogClient client)
          Called once client has successfully logged in but before started to receive binlog events.
 void onDisconnect(BinaryLogClient client)
          Called upon disconnect (regardless of the reason).
 void onEventDeserializationFailure(BinaryLogClient client, Exception ex)
          Called in case of failed event deserialization.
 

Method Detail

onConnect

void onConnect(BinaryLogClient client)
Called once client has successfully logged in but before started to receive binlog events.


onCommunicationFailure

void onCommunicationFailure(BinaryLogClient client,
                            Exception ex)
It's guarantied to be called before onDisconnect(BinaryLogClient)) in case of communication failure.


onEventDeserializationFailure

void onEventDeserializationFailure(BinaryLogClient client,
                                   Exception ex)
Called in case of failed event deserialization. Note this type of error does NOT cause client to disconnect. If you wish to stop receiving events you'll need to fire client.disconnect() manually.


onDisconnect

void onDisconnect(BinaryLogClient client)
Called upon disconnect (regardless of the reason).



Copyright © 2016. All Rights Reserved.