Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help


search: keywords: ['java', 'odatabasedocument', 'listeners', 'registerlistener']

ODatabaseDocument - registerListener()

Subscribes the given listener to database events.

Using Listeners

Listeners allow you to monitor the database for particular events. For instance, if you would like certain methods to execute whenever the database closes, initiates or commits a transaction, and so on. Using this method, you can register an ODatabaseListener instance with the database.

Syntax

void ODatabaseDocument().registerListener(ODatabaseListener listener)
ArgumentTypeDescription
listenerODatabaseListenerListener to register