Openwings API Documentation (v1.0)

net.openwings.component
Interface EventServiceListener


public interface EventServiceListener

This interface defines a callback which can be passed to publishService() / subscribeService() methods of the Component interface to register ongoing interest in certain asynchronous services (topics). The criteria used to identify these services consists of the service interface and (optional) EventServiceParameters object passed to publishService()

Since:
0.9

Method Summary
 void serviceAvailable(java.lang.Class serviceInterface, ServiceResult serviceResult)
          This callback method is invoked when a new asynchronous service becomes available which meets the criteria passed to the publishService() method of the Component interface.
 void serviceUnavailable(UniqueID service)
          This callback method is invoked when the service publisher that created a service (topic) unpublishes a service previously passed to servicePublished().
 

Method Detail

serviceAvailable

public void serviceAvailable(java.lang.Class serviceInterface,
                             ServiceResult serviceResult)
This callback method is invoked when a new asynchronous service becomes available which meets the criteria passed to the publishService() method of the Component interface. The Class object serviceInterface fully describes the service being used, so the same EventServiceListener could listen for different types of services.

Parameters:
serviceInterface - interface describing the service provided.
serviceResult - object containing the provided service plus additional information such as the service unique identifier, attributes, and user interfaces.

serviceUnavailable

public void serviceUnavailable(UniqueID service)
This callback method is invoked when the service publisher that created a service (topic) unpublishes a service previously passed to servicePublished().


Openwings API Documentation (v1.0)