@Override public void execute() { assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op"; openContextImpl.setFireDisabled(false); openContext.fire(); openContext = null; openContextImpl = null; } });
/** * Returns a mutable {@link RequestContext} and enqueues the given receiver to * be called as though it had been passed directly to * {@link RequestContext#fire(Receiver)}. */ public C get(Receiver<Void> receiver) { if (openContext == null) { openContext = createContext(requestFactory); openContextImpl = (AbstractRequestContext) openContext; openContextImpl.setFireDisabled(true); getScheduler().scheduleFinally(new ScheduledCommand() { @Override public void execute() { assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op"; openContextImpl.setFireDisabled(false); openContext.fire(); openContext = null; openContextImpl = null; } }); } if (receiver != null) { // Queue a final callback receiver openContextImpl.fire(receiver); } return openContext; }
@Override public void execute() { assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op"; openContextImpl.setFireDisabled(false); openContext.fire(); openContext = null; openContextImpl = null; } });
@Override public void execute() { assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op"; openContextImpl.setFireDisabled(false); openContext.fire(); openContext = null; openContextImpl = null; } });
@Override public void execute() { assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op"; openContextImpl.setFireDisabled(false); openContext.fire(); openContext = null; openContextImpl = null; } });
/** * Returns a mutable {@link RequestContext} and enqueues the given receiver to * be called as though it had been passed directly to * {@link RequestContext#fire(Receiver)}. */ public C get(Receiver<Void> receiver) { if (openContext == null) { openContext = createContext(requestFactory); openContextImpl = (AbstractRequestContext) openContext; openContextImpl.setFireDisabled(true); getScheduler().scheduleFinally(new ScheduledCommand() { @Override public void execute() { assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op"; openContextImpl.setFireDisabled(false); openContext.fire(); openContext = null; openContextImpl = null; } }); } if (receiver != null) { // Queue a final callback receiver openContextImpl.fire(receiver); } return openContext; }
/** * Returns a mutable {@link RequestContext} and enqueues the given receiver to * be called as though it had been passed directly to * {@link RequestContext#fire(Receiver)}. */ public C get(Receiver<Void> receiver) { if (openContext == null) { openContext = createContext(requestFactory); openContextImpl = (AbstractRequestContext) openContext; openContextImpl.setFireDisabled(true); getScheduler().scheduleFinally(new ScheduledCommand() { @Override public void execute() { assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op"; openContextImpl.setFireDisabled(false); openContext.fire(); openContext = null; openContextImpl = null; } }); } if (receiver != null) { // Queue a final callback receiver openContextImpl.fire(receiver); } return openContext; }
/** * Returns a mutable {@link RequestContext} and enqueues the given receiver to * be called as though it had been passed directly to * {@link RequestContext#fire(Receiver)}. */ public C get(Receiver<Void> receiver) { if (openContext == null) { openContext = createContext(requestFactory); openContextImpl = (AbstractRequestContext) openContext; openContextImpl.setFireDisabled(true); getScheduler().scheduleFinally(new ScheduledCommand() { @Override public void execute() { assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op"; openContextImpl.setFireDisabled(false); openContext.fire(); openContext = null; openContextImpl = null; } }); } if (receiver != null) { // Queue a final callback receiver openContextImpl.fire(receiver); } return openContext; }