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

## com.sun.jini.lease
Class BasicRenewalFailureEvent

    java.lang.Object
      java.util.EventObject
          net.jini.core.event.RemoteEvent
              net.jini.lease.RenewalFailureEvent
                  com.sun.jini.lease.BasicRenewalFailureEvent

All Implemented Interfaces:
  Serializable

public class BasicRenewalFailureEvent
extends RenewalFailureEvent

Basic implementation of `RenewalFailureEvent` that defers unmarshalling.

The `Lease` that could not be renewed and any accompanying `Throwable` will not be deserialized until the appropriate accessor is called.

See Also:
  `LeaseRenewalSet`, Serialized Form

Field Summary

Fields inherited from class net.jini.core.event.RemoteEvent
`eventID, handback, seqNum, source`

Constructor Summary
`BasicRenewalFailureEvent(LeaseRenewalSet source, long seqNum, MarshalledObject handback, MarshalledInstance marshalledLease, MarshalledInstance marshalledThrowable)` Simple constructor.

Method Summary
`Lease` | `getLease()` Returns the lease that could not be renewed.
`Throwable` | `getThrowable()` Returns the exception (if any) that was thrown by the last renewal attempt.

Methods inherited from class net.jini.core.event.RemoteEvent
`getID, getRegistrationObject, getSequenceNumber`

Methods inherited from class java.util.EventObject
`getSource, toString`

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

Constructor Detail

### BasicRenewalFailureEvent

    public BasicRenewalFailureEvent(LeaseRenewalSet source,
                                    long seqNum,
                                    MarshalledObject handback,
                                    MarshalledInstance marshalledLease,
                                    MarshalledInstance marshalledThrowable)

  Simple constructor. Note event id is fixed to `LeaseRenewalSet.RENEWAL_FAILURE_EVENT_ID`.

Parameters:
  `source` - the `LeaseRenewalSet` that generated the event
  `seqNum` - the sequence number of this event
  `handback` - the client handback
  `marshalledLease` - the lease which could not be renewed, in marshalled form
  `marshalledThrowable` - the first exception that was thrown in the last chain of renewal failures, in marshalled form. May be `null` in which case `getThrowable` will return `null`.

Method Detail

### getLease

    public Lease getLease()
                   throws IOException,
                          ClassNotFoundException

  Returns the lease that could not be renewed. When the event is deserialized, the lease is left in marshalled form. It is only unmarshalled when this call is made. If a call to this method fails, future calls will attempt to re-unmarshal the lease. Once the lease is successfully unmarshalled it is cached in a transient field so future calls will not result in `IOException` or `ClassNotFoundException`.

  Specified by:
    `getLease` in class `RenewalFailureEvent`
  Returns:
    the unmarshalled lease
  Throws:
    `IOException` - if there are problems unmarshalling the lease, usually because of some sort of class mismatch
    `ClassNotFoundException` - if there are problems unmarshalling the lease, usually because one of the classes associated with the lease's implementation could not be loaded
    `SecurityException` - if this object was unmarshalled from a stream that required codebase integrity, and the integrity of the lease's codebase could not be verified

### getThrowable

    public Throwable getThrowable()
                           throws IOException,
                                  ClassNotFoundException

  Returns the exception (if any) that was thrown by the last renewal attempt.

  When the event is deserialized, the exception is left in marshalled form. It is only unmarshalled when this call is made. If a call to this method fails, future calls will attempt to re-unmarshal the exception. Once the exception is successfully unmarshalled it is cached in a transient field so future calls will not result in `IOException` or `ClassNotFoundException`.

  Specified by:
    `getThrowable` in class `RenewalFailureEvent`
  Returns:
    the unmarshalled exception
  Throws:
    `IOException` - if there are problems unmarshalling the exception, usually because of some sort of class mismatch
    `ClassNotFoundException` - if there are problems unmarshalling the exception, usually because one of the classes associated with the exception's implementation could not be loaded
    `SecurityException` - if this object was unmarshalled from a stream that required codebase integrity, and the integrity of the exception's codebase could not be verified

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