com.sun.jini.outrigger
Class OutriggerAvailabilityEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.jini.core.event.RemoteEvent
          extended by net.jini.space.AvailabilityEvent
              extended by com.sun.jini.outrigger.OutriggerAvailabilityEvent
All Implemented Interfaces:
Serializable

 class OutriggerAvailabilityEvent
extends AvailabilityEvent

Outrigger's implementation of AvailabilityEvent


Field Summary
private  EntryRep rep
          The entry that triggered the event
private static long serialVersionUID
           
 
Fields inherited from class net.jini.core.event.RemoteEvent
eventID, handback, seqNum, source
 
Constructor Summary
OutriggerAvailabilityEvent(JavaSpace source, long eventID, long seqNum, MarshalledObject handback, boolean visibilityTransition, EntryRep rep)
          Constructs an OutriggerAvailabilityEvent object.
 
Method Summary
 Entry getEntry()
          Returns a copy of the Entry whose transition triggered this event.
 Entry getSnapshot()
          Returns a snapshot of the Entry whose transition triggered this event.
private  void readObjectNoData()
           
 
Methods inherited from class net.jini.space.AvailabilityEvent
isVisibilityTransition
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

rep

private final EntryRep rep
The entry that triggered the event

Constructor Detail

OutriggerAvailabilityEvent

OutriggerAvailabilityEvent(JavaSpace source,
                           long eventID,
                           long seqNum,
                           MarshalledObject handback,
                           boolean visibilityTransition,
                           EntryRep rep)
Constructs an OutriggerAvailabilityEvent object.

Parameters:
source - an Object representing the event source
eventID - a long containing the event identifier
seqNum - a long containing the event sequence number
handback - a MarshalledObject that was passed in as part of the original event registration.
visibilityTransition - true if this event must also signal a transition from invisible to visible
rep - the entry that triggered the event
Method Detail

readObjectNoData

private void readObjectNoData()
                       throws InvalidObjectException
Throws:
InvalidObjectException - if called

getEntry

public Entry getEntry()
               throws UnusableEntryException
Description copied from class: AvailabilityEvent
Returns a copy of the Entry whose transition triggered this event. The returned Entry must be unmarshalled in accordance with the Jini Entry Specification.

Specified by:
getEntry in class AvailabilityEvent
Returns:
a copy of the Entry whose transition triggered this event
Throws:
UnusableEntryException - if the Entry can't be unmarshalled in the client. The next call must re-attempt unmarshalling the Entry

getSnapshot

public Entry getSnapshot()
Description copied from class: AvailabilityEvent
Returns a snapshot of the Entry whose transition triggered this event. Snapshots are defined in section JS.2.6 of the JavaSpaces Service Specification and are an alternative representation of a given Entry produced by a particular space for use with that same space. Passing a snapshot to a space is generally more efficient than passing the original Entry.

Any snapshot returned by this method will meet the same contract as the object returned by passing the result of getEntry to JavaSpace.snapshot.

Generally there is a cost associated with calling the JavaSpace.snapshot method and thus creating a snapshot using that method is usually only worthwhile if the resulting snapshot is used more than once. The cost of invoking this method should be low and should be worthwhile even if the resulting snapshot is used only once.

Specified by:
getSnapshot in class AvailabilityEvent
Returns:
a snapshot of the Entry whose transition triggered this event


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