com.sun.jini.norm.event
Interface SendMonitor

All Known Implementing Classes:
NormServerBaseImpl.SendMonitorImpl

public interface SendMonitor

Object associated with an EventType so it can ensure that the lease on an event notification is still valid and notify the client when a exception occurs in the course of attempting to send an event.

Author:
Sun Microsystems, Inc.
See Also:
EventType, EventTypeGenerator

Method Summary
 void definiteException(EventType type, RemoteEvent ev, long registrationNumber, Throwable t)
          Method called when an attempt to send the event associated with this object results in a definite exception (e.g.
 boolean isCurrent()
          Should return true if the lease associated with this event is still valid and false otherwise.
 

Method Detail

definiteException

void definiteException(EventType type,
                       RemoteEvent ev,
                       long registrationNumber,
                       Throwable t)
Method called when an attempt to send the event associated with this object results in a definite exception (e.g. java.rmi.NoSuchObjectException or any other Throwable that is not a subclass of java.rmi.RemoteException.

The caller will own no locks when calling this method.

Parameters:
type - the object that generated the event
ev - the remote event that could not be sent
registrationNumber - of the event registration that generated the exception. This can be used to call EventType.clearListenerIfSequenceMatch ensure only the registration that cause the problem gets cleared.
t - the definite exception that caused us to give up sending the event

isCurrent

boolean isCurrent()
Should return true if the lease associated with this event is still valid and false otherwise.

The caller will own no locks when calling this method.



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