Rio Project 4.2 API Documentation



org.rioproject.event
Interface EventConsumer

All Superinterfaces:
EventListener, Remote, RemoteEventListener
All Known Implementing Classes:
BasicEventConsumer, DynamicEventConsumer

public interface EventConsumer
extends RemoteEventListener

The EventConsumer defines the semantics for a client to register and receive remote event notifications

Author:
Dennis Reedy

Method Summary
 boolean deregister(RemoteServiceEventListener listener)
          Informs the EventConsumer to de-register for event notifications across all discovered EventProducer instances.
 Object getEventRegistrationSource(long eventID)
          Returns the source object returned as part of the EventRegistration
 boolean register(RemoteServiceEventListener listener)
          Informs the EventConsumer to register for event notifications to all discovered EventProducer instances that provide support for the event described in an EventDescriptor
 boolean register(RemoteServiceEventListener listener, MarshalledObject handback)
          Informs the EventConsumer to register for event notifications to all discovered EventProducer instances that provide support for the event described in an EventDescriptor.
 void terminate()
          The terminate method will de-register for event notifications across all discovered EventProducer instances.
 
Methods inherited from interface net.jini.core.event.RemoteEventListener
notify
 

Method Detail

register

boolean register(RemoteServiceEventListener listener)
                 throws RemoteException
Informs the EventConsumer to register for event notifications to all discovered EventProducer instances that provide support for the event described in an EventDescriptor

Parameters:
listener - The RemoteServiceEventListener
Returns:
True if successful, otherwise false
Throws:
RemoteException - if communication errors occur

register

boolean register(RemoteServiceEventListener listener,
                 MarshalledObject handback)
                 throws RemoteException
Informs the EventConsumer to register for event notifications to all discovered EventProducer instances that provide support for the event described in an EventDescriptor. This method provides the ability to pass a MarshalledObject as part of the registration

Parameters:
listener - The RemoteServiceEventListener
handback - The MarshalledObject to use when registering
Returns:
True if successful, otherwise false
Throws:
RemoteException - if communication errors occur

deregister

boolean deregister(RemoteServiceEventListener listener)
                   throws RemoteException
Informs the EventConsumer to de-register for event notifications across all discovered EventProducer instances. Invocation of this method will result in the cancellation of any leases involved with event registration and the removal from the event notification pool

Parameters:
listener - The RemoteServiceEventListener
Returns:
True if successful, otherwise false
Throws:
RemoteException - if communication errors occur

getEventRegistrationSource

Object getEventRegistrationSource(long eventID)
                                  throws RemoteException
Returns the source object returned as part of the EventRegistration

Parameters:
eventID - The eventID
Returns:
The source object
Throws:
RemoteException - if communication errors occur

terminate

void terminate()
               throws RemoteException
The terminate method will de-register for event notifications across all discovered EventProducer instances. Invocation of this method will result in the cancellation of any leases involved with event registration and the removal from the event notification pool. This method will also unexport the EventConsumer, removing it from the RMI runtime

Throws:
RemoteException - if communication errors occur

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.