com.sun.jini.norm.event
Interface EventFactory

All Known Implementing Classes:
ClientLeaseWrapper.FailureFactory, LeaseSet.WarningFactory

public interface EventFactory

Factory interface for creating net.jini.core.event.RemoteEvent. An object of this type is passed to each call of EventType.sendEvent and is used by the EventType object to generate the concrete RemoteEvent associated with a given event occurrence on demand. Providing a factory to sendEvent instead of an actual RemoteEvent object allows eventType object to send an event originally intended for one listener to another.

Author:
Sun Microsystems, Inc.
See Also:
EventType, EventType.sendEvent(com.sun.jini.norm.event.EventFactory)

Method Summary
 RemoteEvent createEvent(long eventID, long seqNum, MarshalledObject handback)
          Create the concrete RemoteEvent for the associated event occurrence.
 

Method Detail

createEvent

RemoteEvent createEvent(long eventID,
                        long seqNum,
                        MarshalledObject handback)
Create the concrete RemoteEvent for the associated event occurrence. Implementations should allow for the possibility of being called with the same argument more that once, especially the same eventID and seqNum. The factory should not mutate the event after it returns it.

The caller will own no locks when calling this method.

Parameters:
eventID - the event ID the new event should have
seqNum - the sequence number the new event object should have
handback - the handback the new event object should have
Returns:
the new event object


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