SQLFire 1.0.1

com.vmware.sqlfire.callbacks
Interface EventCallback


public interface EventCallback

Interface used by implementations of the "CLASSNAME" given in "SYS.ADD_LISTENER" and "SYS.ATTACH_WRITER" procedures.


Method Summary
 void close()
          Any cleanup required when the callback is destroyed should be done here.
 void init(String initStr)
          Initialize this callback with parameters provided in the form of given string.
 void onEvent(Event event)
          This method is invoked when the callback is fired on a table event.
 

Method Detail

onEvent

void onEvent(Event event)
             throws SQLException
This method is invoked when the callback is fired on a table event.

Parameters:
event - a Event object that provides details of the event including the old row, update row etc.
Throws:
SQLException - On failure. If an exception is thrown in a writer then the current update is aborted. If an exception is thrown in a listener then the update goes through but exception is propagated back to the originating node.

close

void close()
           throws SQLException
Any cleanup required when the callback is destroyed should be done here.

Throws:
SQLException - on error

init

void init(String initStr)
          throws SQLException
Initialize this callback with parameters provided in the form of given string. This is invoked immediately after the creation of the callback using its default constructor.

Parameters:
initStr - String used to initialize this callback
Throws:
SQLException - on an error during initialization

SQLFire 1.0.1

Copyright © 2010-2011 VMware, Inc. All rights reserved.