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

## net.jini.event
Interface MailboxRegistration

public interface MailboxRegistration

The `MailboxRegistration` defines the interface through which a client manages its registration and its notification processing. Event mailbox clients use this interface to:

- Manage the lease for this registration
- Obtain a `RemoteEventListener` reference that can be registered with event generators. This listener will then store any received events for this registration.
- Enable or disable the delivery of any stored events for this registration.

Since:
  1.1

Method Summary
`void` | `disableDelivery()` Ceases delivery of stored notifications to the existing target listener, if any.
`void` | `enableDelivery(RemoteEventListener target)` Initiates delivery of stored notifications to the supplied `target` listener, if any.
`Lease` | `getLease()` Returns the `Lease` object associated with this registration.
`RemoteEventListener` | `getListener()` Returns the `RemoteEventListener` associated with this registration.

Method Detail

### getLease

    public Lease getLease()

  Returns the `Lease` object associated with this registration. The client can renew or cancel the registration with the mailbox service through this lease object.

  Returns:
    The lease object associated with this registration

### getListener

    public RemoteEventListener getListener()

  Returns the `RemoteEventListener` associated with this registration. This listener can then be submitted as the `RemoteEventListener` argument to an event generator's registration method(s).

  Returns:
    The `RemoteEventListener` associated with this registration.

### enableDelivery

    public void enableDelivery(RemoteEventListener target)
                        throws RemoteException

  Initiates delivery of stored notifications to the supplied `target` listener, if any. If a target listener already exists, then it will be replaced with the specified target listener. Passing `null` as the `target` parameter has the same effect as calling the `disableDelivery` method.

  Parameters:
    `target` - The listener to be notified of stored events, if any.
  Throws:
    `IllegalArgumentException` - if the supplied `target` parameter is a listener object that was generated by the mailbox service itself.
    `RemoteException` - if there is a communication failure between the client and the service.

### disableDelivery

    public void disableDelivery()
                         throws RemoteException

  Ceases delivery of stored notifications to the existing target listener, if any. It is acceptable to call this method even if no target listener is currently enabled.

  Throws:
    `RemoteException` - if there is a communication failure between the client and the service.

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

Copyright © 2004 Sun Microsystems, Inc. All rights reserved