private class AvailabilityRegistrationWatcher.VisibilityEventSender extends Object implements EventSender
EventSender for visibility events| Modifier and Type | Field and Description |
|---|---|
private boolean |
isVisible
true if this is a visibility event |
private long |
ourSeqNumber
the sequence number this event should have
|
private EntryRep |
rep
the
EntryRep for the entry that became visible |
| Modifier | Constructor and Description |
|---|---|
private |
VisibilityEventSender(EntryRep rep,
boolean isVisible,
long ourSeqNumber)
Create a new
VisibilityEventSender that will send
a new OutriggerAvailabilityEvent. |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelRegistration()
Called when the event sending infrastructure decides
to give up on the event registration associated with
this sender.
|
void |
sendEvent(JavaSpace source,
long now,
ProxyPreparer preparer)
Send a remote event to the encapsulated listener of the encapsulated
type, with the encapsulated handback, sequence number.
|
private final EntryRep rep
EntryRep for the entry that became visibleprivate final long ourSeqNumber
private final boolean isVisible
true if this is a visibility eventprivate VisibilityEventSender(EntryRep rep, boolean isVisible, long ourSeqNumber)
VisibilityEventSender that will send
a new OutriggerAvailabilityEvent.rep - the EntryRep for the entry
that became visible/availableisVisible - true if this is a visibility eventourSeqNumber - the sequence number this event should havepublic void sendEvent(JavaSpace source, long now, ProxyPreparer preparer) throws UnknownEventException, IOException, ClassNotFoundException
EventSendersendEvent in interface EventSendersource - the source the event object
sent to the lister should have.now - The current time.preparer - to apply to the listener if it has
been recovered from a store and not yet re-prepared
in this VM.UnknownEventException - if the
call to the listener does. Note, this
will not cause the watcher to remove itself.IOException - if the listener can not
be unmarshalled. May throw RemoteException
if the call to the listener or preparer doesClassNotFoundException - if the listener
needs to be unmarshalled and a necessary
class can not be found.public void cancelRegistration()
EventSendercancelRegistration in interface EventSenderCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.