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.core.event
Class EventRegistration

    java.lang.Object
      net.jini.core.event.EventRegistration

All Implemented Interfaces:
  Serializable

public class EventRegistration
extends Object
implements Serializable

A utility class for use as a return value for event-interest registration methods. Objects of this class are meant to encapsulate the information needed by a client to identify a notification as a response to a registration request and to maintain that registration request. It is not mandatory for an event-interest registration method to use this class.

A registration of interest in some kind of event that occurs within the scope of a transaction is leased in the same way as other event interest registrations. However, the duration of the registration is the minimum of the length of the lease and the duration of the transaction. Simply put, when the transaction ends (either because of a commit or an abort) the interest registration also ends. This is true even if the lease for the event registration has not expired and no call has been made to cancel the lease.

Since:
  1.0
See Also:
  Serialized Form

Field Summary
`protected long` | `eventID` The event identifier.
`protected Lease` | `lease` The registration lease.
`protected long` | `seqNum` The current sequence number.
`protected Object` | `source` The event source.

Constructor Summary
`EventRegistration(long eventID, Object source, Lease lease, long seqNum)` Constructs an `EventRegistration` object.

Method Summary
`long` | `getID()` Returns the identifier that will be used in all RemoteEvents generated for this interest registration.
`Lease` | `getLease()` Returns the Lease object for this registration.
`long` | `getSequenceNumber()` Returns the value of the sequence number on the event kind that was current when the registration was granted, allowing comparison with the sequence number in any subsequent notifications.
`Object` | `getSource()` Returns the source that will be used in all RemoteEvents generated for this interest registration.

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

Field Detail

### eventID

    protected long eventID

  The event identifier.

### source

    protected Object source

  The event source.

### lease

    protected Lease lease

  The registration lease.

### seqNum

    protected long seqNum

  The current sequence number.

Constructor Detail

### EventRegistration

    public EventRegistration(long eventID,
                             Object source,
                             Lease lease,
                             long seqNum)

  Constructs an `EventRegistration` object.

Parameters:
  `eventID` - a `long` representing the event identifier
  `source` - an `Object` representing the event source
  `lease` - the registration `Lease` object
  `seqNum` - a `long` representing the current sequence number

Method Detail

### getID

    public long getID()

  Returns the identifier that will be used in all RemoteEvents generated for this interest registration.

  Returns:
    a long used to identify all RemoteEvents that are generated for this interest registration.
  See Also:
    `RemoteEvent.getID()`

### getSource

    public Object getSource()

  Returns the source that will be used in all RemoteEvents generated for this interest registration.

  Returns:
    an Object that represents the source of all RemoteEvents for this interest registration
  See Also:
    `EventObject.getSource()`

### getLease

    public Lease getLease()

  Returns the Lease object for this registration.

  Returns:
    the Lease object for this registration.

### getSequenceNumber

    public long getSequenceNumber()

  Returns the value of the sequence number on the event kind that was current when the registration was granted, allowing comparison with the sequence number in any subsequent notifications.

  Returns:
    a long representing the value of the sequence number on the event type that was current when the registration was granted, allowing comparison with the sequence number in any subsequent notifications.

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