com.neeve.discovery
Interface IDiscoveryCacheEventHandler

All Known Implementing Classes:
DiscoveryTool

public interface IDiscoveryCacheEventHandler

The Discovery cache event handler interface.

An event handler is a sink for events generated by a discovery cache. Discovery events contain:
- An event type field (an integer value)
- An event data object (a type specific object).
See DiscoveryCacheEvents for a desciption of the various events and their associated data structures.


Method Summary
 void onEvent(IDiscoveryCache cache, int type, Object data)
          The event handler method.
 

Method Detail

onEvent

void onEvent(IDiscoveryCache cache,
             int type,
             Object data)
The event handler method.

It is illegal to perform any operation on the cache from within the event handler. An IllegalStateException is thrown if the user attempts to perform any operation on the cache from within the event handler.

Parameters:
cache - The discovery cache that dispatched the event.
type - The event type.
data - The type specific event event data. See DiscoveryCacheEvents for which data structures are dispatched with each event type.
Threading:
The discovery cache dispatches events in the context of a thread of its choosing.


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.