class OutriggerAvailabilityEvent extends AvailabilityEvent
AvailabilityEvent
Modifier and Type | Field and Description |
---|---|
private EntryRep |
rep
The entry that triggered the event
|
private static long |
serialVersionUID |
eventID, handback, seqNum, source
Constructor and Description |
---|
OutriggerAvailabilityEvent(JavaSpace source,
long eventID,
long seqNum,
MarshalledObject handback,
boolean visibilityTransition,
EntryRep rep)
Constructs an OutriggerAvailabilityEvent object.
|
Modifier and Type | Method and Description |
---|---|
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() |
isVisibilityTransition
getID, getRegistrationObject, getSequenceNumber
getSource, toString
private static final long serialVersionUID
private final EntryRep rep
OutriggerAvailabilityEvent(JavaSpace source, long eventID, long seqNum, MarshalledObject handback, boolean visibilityTransition, EntryRep rep)
source
- an Object
representing the event sourceeventID
- a long
containing the event identifierseqNum
- a long
containing the event sequence numberhandback
- 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 visiblerep
- the entry that triggered the eventprivate void readObjectNoData() throws InvalidObjectException
InvalidObjectException
- if calledpublic Entry getEntry() throws UnusableEntryException
AvailabilityEvent
Entry
whose transition
triggered this event. The returned Entry
must
be unmarshalled in accordance with the Jini
Entry Specification.getEntry
in class AvailabilityEvent
Entry
whose transition
triggered this eventUnusableEntryException
- if the Entry
can't be unmarshalled in the client. The next call
must re-attempt unmarshalling the
Entry
public Entry getSnapshot()
AvailabilityEvent
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.
getSnapshot
in class AvailabilityEvent
Entry
whose
transition triggered this eventCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.