com.sybase.jdbcx
Interface SybEventHandler
- public abstract interface SybEventHandler
Interface for event handlers to receive and process Sybase Open Server event
notifications.
An event handler can be installed for any procedure registered at the
Open Server on a connection by calling
SybConnection.regWatch
. An event handler must implement the
method event
, which is called whenever the specified
registered procedure
event occurs at that Open Server. An event handler can handle events
for more than one registered procedure. Each event handler operates in
a separate thread so that processing can occur asynchronously with
other threads in the application.
- See Also:
SybConnection.regWatch(java.lang.String, com.sybase.jdbcx.SybEventHandler, int)
,
SybConnection.regNoWatch(java.lang.String)
Field Summary |
static int |
NOTIFY_ALWAYS
This constant can be passed to SybConnection.regWatch
to indicate that the event handler should be called whenever
the event occurs. |
static int |
NOTIFY_ONCE
This constant can be passed to SybConnection.regWatch
to indicate that the event handler should be removed from
the watch list after it has been invoked once. |
Method Summary |
void |
event(String proc_name,
ResultSet params)
This method, supplied by the user,
is called when a registered procedure executes. |
NOTIFY_ALWAYS
public static final int NOTIFY_ALWAYS
- This constant can be passed to
SybConnection.regWatch
to indicate that the event handler should be called whenever
the event occurs.
- See Also:
SybConnection.regWatch
NOTIFY_ONCE
public static final int NOTIFY_ONCE
- This constant can be passed to
SybConnection.regWatch
to indicate that the event handler should be removed from
the watch list after it has been invoked once.
- See Also:
SybConnection.regWatch
event
public void event(String proc_name,
ResultSet params)
- This method, supplied by the user,
is called when a registered procedure executes.
- Parameters:
proc_name
- the name of the registered procedure for which the
notification has just occurredresult
- the list of arguments
that was used to call the registered procedure. A parameter result
set is a read-only ResultSet
instance consisting of one
row.