com.github.shyiko.mysql.binlog
Class BinaryLogClient.AbstractLifecycleListener

java.lang.Object
  extended by com.github.shyiko.mysql.binlog.BinaryLogClient.AbstractLifecycleListener
All Implemented Interfaces:
BinaryLogClient.LifecycleListener
Enclosing class:
BinaryLogClient

public abstract static class BinaryLogClient.AbstractLifecycleListener
extends Object
implements BinaryLogClient.LifecycleListener

Default (no-op) implementation of BinaryLogClient.LifecycleListener.


Constructor Summary
BinaryLogClient.AbstractLifecycleListener()
           
 
Method Summary
 void onCommunicationFailure(BinaryLogClient client, Exception ex)
          It's guarantied to be called before BinaryLogClient.LifecycleListener.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryLogClient.AbstractLifecycleListener

public BinaryLogClient.AbstractLifecycleListener()
Method Detail

onConnect

public void onConnect(BinaryLogClient client)
Description copied from interface: BinaryLogClient.LifecycleListener
Called once client has successfully logged in but before started to receive binlog events.

Specified by:
onConnect in interface BinaryLogClient.LifecycleListener

onCommunicationFailure

public void onCommunicationFailure(BinaryLogClient client,
                                   Exception ex)
Description copied from interface: BinaryLogClient.LifecycleListener
It's guarantied to be called before BinaryLogClient.LifecycleListener.onDisconnect(BinaryLogClient)) in case of communication failure.

Specified by:
onCommunicationFailure in interface BinaryLogClient.LifecycleListener

onEventDeserializationFailure

public void onEventDeserializationFailure(BinaryLogClient client,
                                          Exception ex)
Description copied from interface: BinaryLogClient.LifecycleListener
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.

Specified by:
onEventDeserializationFailure in interface BinaryLogClient.LifecycleListener

onDisconnect

public void onDisconnect(BinaryLogClient client)
Description copied from interface: BinaryLogClient.LifecycleListener
Called upon disconnect (regardless of the reason).

Specified by:
onDisconnect in interface BinaryLogClient.LifecycleListener


Copyright © 2016. All Rights Reserved.