[MDSAL-254] Implementation for offerNotification method with timeout in DOMNotificationRouter Created: 22/May/17  Updated: 09/Mar/18  Resolved: 23/May/17

Status: Resolved
Project: mdsal
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: MerlinChan Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

@Override
public ListenableFuture<?> offerNotification(final DOMNotification notification, final long timeout,
final TimeUnit unit) throws InterruptedException {
final Collection<ListenerRegistration<? extends DOMNotificationListener>> subscribers = listeners.get(notification.getType());
if (subscribers.isEmpty())

{ return NO_LISTENERS; }

// Attempt to perform a non-blocking publish first
final ListenableFuture<?> noBlock = tryPublish(notification, subscribers);
if (!DOMNotificationPublishService.REJECTED.equals(noBlock))

{ return noBlock; }

/*

  • FIXME: we need a background thread, which will watch out for blocking too long. Here
  • we will arm a tasklet for it and synchronize delivery of interrupt properly.
    */
    throw new UnsupportedOperationException("Not implemented yet");


 Comments   
Comment by MerlinChan [ 22/May/17 ]

There should be an implementation of offerNotification method in DOMNotificationRouter class,if I add a listener for watching out for blocking too long,how can i wakeup the publish operation?

Generated at Wed Feb 07 20:09:14 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.