com.sun.jini.reggie
Class RegistrarImpl.EventReg

java.lang.Object
  extended by com.sun.jini.reggie.RegistrarImpl.EventReg
All Implemented Interfaces:
Serializable, Comparable
Enclosing class:
RegistrarImpl

private static final class RegistrarImpl.EventReg
extends Object
implements Comparable, Serializable

An event registration record.


Field Summary
 long eventID
          The event id.
 MarshalledObject handback
          The handback object.
 long leaseExpiration
          The lease expiration time.
 Uuid leaseID
          The lease id.
 RemoteEventListener listener
          The event listener.
 long seqNo
          The current sequence number.
private static long serialVersionUID
           
 Template tmpl
          The template to match.
 int transitions
          The transitions.
 
Constructor Summary
RegistrarImpl.EventReg(long eventID, Uuid leaseID, Template tmpl, int transitions, RemoteEventListener listener, MarshalledObject handback, long leaseExpiration)
          Simple constructor
 
Method Summary
 int compareTo(Object obj)
          Primary sort by leaseExpiration, secondary by eventID.
 void prepareListener(ProxyPreparer preparer)
          Prepares listener (if non-null) using the given proxy preparer.
private  void readObject(ObjectInputStream stream)
          Unmarshals the event listener.
private  void writeObject(ObjectOutputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

eventID

public final long eventID
The event id.


leaseID

public final Uuid leaseID
The lease id.


tmpl

public final Template tmpl
The template to match.


transitions

public final int transitions
The transitions.


seqNo

public long seqNo
The current sequence number.


listener

public transient RemoteEventListener listener
The event listener.


handback

public final MarshalledObject handback
The handback object.


leaseExpiration

public long leaseExpiration
The lease expiration time.

Constructor Detail

RegistrarImpl.EventReg

public RegistrarImpl.EventReg(long eventID,
                              Uuid leaseID,
                              Template tmpl,
                              int transitions,
                              RemoteEventListener listener,
                              MarshalledObject handback,
                              long leaseExpiration)
Simple constructor

Method Detail

compareTo

public int compareTo(Object obj)
Primary sort by leaseExpiration, secondary by eventID. The secondary sort is immaterial, except to ensure a total order (required by TreeMap).

Specified by:
compareTo in interface Comparable

prepareListener

public void prepareListener(ProxyPreparer preparer)
Prepares listener (if non-null) using the given proxy preparer. If preparation fails, the listener field is set to null.


writeObject

private void writeObject(ObjectOutputStream stream)
                  throws IOException
Throws:
IOException

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Unmarshals the event listener.

Throws:
IOException
ClassNotFoundException


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.