'Pass a callback function that will be called when the channel is
closed. The callback function will receive the channel, the
reply_code (int) and the reply_text (int) describing why the channel was
closed.
If the channel is closed by broker via Channel.Close, the callback will
receive the reply_code/reply_text provided by the broker.
If channel closing is initiated by user (either directly of indirectly
by closing a connection containing the channel) and closing
concludes gracefully without Channel.Close from the broker and without
loss of connection, the callback will receive 0 as reply_code and empty
string as reply_text.
If channel was closed due to loss of connection, the callback will
receive reply_code and reply_text representing the loss of connection.
:param callable callback: The callback, having the signature:
callback(Channel, int reply_code, str reply_text)'

def add_on_close_callback(self, callback):

    self.callbacks.add(self.channel_number, '_on_channel_close', callback, False, self)
