public interface Event
Super-interface common to all events.
Events related to the various
communication objects (Connection
,
Filter
, Query
,
Subscription
, Transaction
) must be
handled by the methods of the corresponding Listener
.
Field Summary | |
---|---|
static int |
RESULT_GENERIC_ERROR
Generic failure-code returned by the server when a more specific error is not available. |
static int |
RESULT_OK
Positive answer returned by the server when the operation completed successfully. |
Method Summary | |
---|---|
int |
getResult()
Returns the server-answer associated to this event. |
Field Detail |
---|
static final int RESULT_OK
This value is returned by getResult()
.
static final int RESULT_GENERIC_ERROR
This value is returned by getResult()
.
Method Detail |
---|
int getResult()
Each event generated by the server transports a server-answer that specifies how the corresponding operation was performed on the server.
E.g.: a ConnectionOpenEvent
is generated by the server as an
answer to the Connection.open()
sent by the client. If
the opening was OK then the server-answer (returned by this method) is
RESULT_OK
, otherwise a generic (RESULT_GENERIC_ERROR
)
or specific (ConnectionOpenEvent
result codes) error is returned.
RESULT_OK
or RESULT_GENERIC_ERROR
or
a different value indicating a specific error that is described
in the specific event documentation.