Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.event
Class DynamicEventConsumer

    java.lang.Object
      org.jini.rio.event.BasicEventConsumer
          org.jini.rio.event.DynamicEventConsumer

All Implemented Interfaces:
  Remote, EventListener, RemoteEventListener, ServerProxyTrust, EventConsumer

Direct Known Subclasses:
  PooledEventConsumer

    public class DynamicEventConsumer

extends BasicEventConsumer

A DynamicEventConsumer extends `BasicEventConsumer` and provides the capability to discover when `EventProducer` instances join and leave the network

Field Summary

Fields inherited from class org.jini.rio.event.BasicEventConsumer
`DEFAULT_LEASE_DURATION, edTemplate, ektime, eventRegistrationTable, eventSubscribers, handback, leaseDuration, leaseTable, received, RESPONSE_WATCH, responseWatch, sktime, watchRegistry`

Constructor Summary
`DynamicEventConsumer(EventDescriptor edTemplate, DiscoveryManagement dMgr)` Create a DynamicEventConsumer with an EventDescriptor
`DynamicEventConsumer(EventDescriptor edTemplate, RemoteServiceEventListener listener, DiscoveryManagement dMgr)` Create a DynamicEventConsumer with an EventDescriptor, a RemoteServiceEventListener and a DiscoveryManagement instance
`DynamicEventConsumer(EventDescriptor edTemplate, RemoteServiceEventListener listener, MarshalledObject handback, DiscoveryManagement dMgr)` Create a DynamicEventConsumer with an EventDescriptor, a RemoteServiceEventListener a MarshalledObject handback, a specified lease duration to be used for all event registrations and a DiscoveryManagement instance
`DynamicEventConsumer(EventDescriptor edTemplate, RemoteServiceEventListener listener, MarshalledObject handback, DiscoveryManagement dMgr, Configuration config)` Create a DynamicEventConsumer with an EventDescriptor, a RemoteServiceEventListener a MarshalledObject handback, a specified lease duration to be used for all event registrations and a DiscoveryManagement instance

Method Summary
`EventProducer[]` | `getEventProducers()` Returns an array of all EventProducer proxy objects that have been discovered
`boolean` | `register(RemoteServiceEventListener listener, MarshalledObject handback)` Override parent's register method to provide the ability if we've discovered EventProducer instances that match we should register with them
`void` | `terminate()` Override parent's terminate() method to terminate the ServiceDiscoveryManager

Methods inherited from class org.jini.rio.event.BasicEventConsumer
`createWatch, deregister, deregister, deregister, destroyWatch, finalize, getDescriptor, getEventRegistrationSource, getListeners, getProxyVerifier, getWatch, notify, printStats, register, register`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DynamicEventConsumer

    public DynamicEventConsumer(EventDescriptor edTemplate,
                                DiscoveryManagement dMgr)
                         throws Exception

  Create a DynamicEventConsumer with an EventDescriptor

  Parameters:
    `edTemplate` - The EventDescriptor template
    `dMgr` - The DiscoveryManagement instance
  Throws:
    `Exception` - if the DynamicEventConsumer cannot be created

### DynamicEventConsumer

    public DynamicEventConsumer(EventDescriptor edTemplate,
                                RemoteServiceEventListener listener,
                                DiscoveryManagement dMgr)
                         throws Exception

  Create a DynamicEventConsumer with an EventDescriptor, a RemoteServiceEventListener and a DiscoveryManagement instance

  Parameters:
    `edTemplate` - The EventDescriptor template
    `listener` - The RemoteServiceEventListener
    `dMgr` - The DiscoveryManagement instance
  Throws:
    `Exception` - if the DynamicEventConsumer cannot be created

### DynamicEventConsumer

    public DynamicEventConsumer(EventDescriptor edTemplate,
                                RemoteServiceEventListener listener,
                                MarshalledObject handback,
                                DiscoveryManagement dMgr)
                         throws Exception

  Create a DynamicEventConsumer with an EventDescriptor, a RemoteServiceEventListener a MarshalledObject handback, a specified lease duration to be used for all event registrations and a DiscoveryManagement instance

  Parameters:
    `edTemplate` - The EventDescriptor template
    `listener` - The RemoteServiceEventListener
    `handback` - The MarshalledObject to be used as a handback
    `dMgr` - The DiscoveryManagement instance
  Throws:
    `Exception` - if the DynamicEventConsumer cannot be created

### DynamicEventConsumer

    public DynamicEventConsumer(EventDescriptor edTemplate,
                                RemoteServiceEventListener listener,
                                MarshalledObject handback,
                                DiscoveryManagement dMgr,
                                Configuration config)
                         throws Exception

  Create a DynamicEventConsumer with an EventDescriptor, a RemoteServiceEventListener a MarshalledObject handback, a specified lease duration to be used for all event registrations and a DiscoveryManagement instance

  Parameters:
    `edTemplate` - The EventDescriptor template
    `listener` - The RemoteServiceEventListener
    `handback` - The MarshalledObject to be used as a handback
    `dMgr` - The DiscoveryManagement instance
    `config` - Configuration object
  Throws:
    `Exception` - if the DynamicEventConsumer cannot be created

Method Detail

### terminate

    public void terminate()

  Override parent's terminate() method to terminate the ServiceDiscoveryManager

  Specified by:
    `terminate` in interface `EventConsumer`
  Overrides:
    `terminate` in class `BasicEventConsumer`

### register

    public boolean register(RemoteServiceEventListener listener,
                            MarshalledObject handback)

  Override parent's register method to provide the ability if we've discovered EventProducer instances that match we should register with them

  Specified by:
    `register` in interface `EventConsumer`
  Overrides:
    `register` in class `BasicEventConsumer`
  Parameters:
    `listener` - The RemoteServiceEventListener
    `handback` - The MarshalledObject to be used as a handback
  Returns:
    true if the RemoteServiceEventListener has been added

### getEventProducers

    public EventProducer[] getEventProducers()

  Returns an array of all EventProducer proxy objects that have been discovered

  Returns:
    An array of EventProducer proxy objects

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.