// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.jdeferred.impl; import org.jdeferred.DoneCallback; import org.jdeferred.DonePipe; import org.jdeferred.FailCallback; import org.jdeferred.FailPipe; import org.jdeferred.ProgressCallback; import org.jdeferred.ProgressPipe; import org.jdeferred.Promise; // Referenced classes of package org.jdeferred.impl: // DeferredObject public class PipedPromise extends DeferredObject implements Promise { public PipedPromise(Promise promise, final DonePipe doneFilter, final FailPipe failFilter, final ProgressPipe progressFilter) { promise.done(new DoneCallback() { final PipedPromise this$0; final DonePipe val$doneFilter; public void onDone(Object obj) { if (doneFilter != null) { pipe(doneFilter.pipeDone(obj)); return; } else { resolve(obj); return; } } { this$0 = PipedPromise.this; doneFilter = donepipe; super(); } }).fail(new FailCallback() { final PipedPromise this$0; final FailPipe val$failFilter; public void onFail(Object obj) { if (failFilter != null) { pipe(failFilter.pipeFail(obj)); return; } else { reject(obj); return; } } { this$0 = PipedPromise.this; failFilter = failpipe; super(); } }).progress(new ProgressCallback() { final PipedPromise this$0; final ProgressPipe val$progressFilter; public void onProgress(Object obj) { if (progressFilter != null) { pipe(progressFilter.pipeProgress(obj)); return; } else { notify(obj); return; } } { this$0 = PipedPromise.this; progressFilter = progresspipe; super(); } }); } protected Promise pipe(Promise promise) { promise.done(new DoneCallback() { final PipedPromise this$0; public void onDone(Object obj) { resolve(obj); } { this$0 = PipedPromise.this; super(); } }).fail(new FailCallback() { final PipedPromise this$0; public void onFail(Object obj) { reject(obj); } { this$0 = PipedPromise.this; super(); } }).progress(new ProgressCallback() { final PipedPromise this$0; public void onProgress(Object obj) { notify(obj); } { this$0 = PipedPromise.this; super(); } }); return promise; } }