public long getSoFar(final int id) {
        if (FileDownloader.getImpl().isServiceConnected()) {
            return FileDownloader.getImpl().getSoFar(id);
        }

        final ConnectSubscriber subscriber = new ConnectSubscriber() {
            private long mValue;

            @Override
            public void connected() {
                mValue = FileDownloader.getImpl().getSoFar(id);
            }

            @Override
            public Object getValue() {
                return mValue;
            }
        };

        wait(subscriber);

        return (long) subscriber.getValue();
    }
public long getSoFar(final int id) {
        if (FileDownloader.getImpl().isServiceConnected()) {
            return FileDownloader.getImpl().getSoFar(id);
        }

        final ConnectSubscriber subscriber = new ConnectSubscriber() {
            private long mValue;

            @Override
            public void connected() {
                mValue = FileDownloader.getImpl().getSoFar(id);
            }

            @Override
            public Object getValue() {
                return mValue;
            }
        };

        wait(subscriber);

        return (long) subscriber.getValue();
    }
public long getSoFar ( final int id ) { if ( FileDownloader . getImpl ( ) . isServiceConnected ( ) ) { return FileDownloader . getImpl ( ) . getSoFar ( id ) ; } final ConnectSubscriber subscriber = new ConnectSubscriber ( ) { private long mValue ; @ Override public void connected ( ) { mValue = FileDownloader . getImpl ( ) . getSoFar ( id ) ; } @ Override public Object getValue ( ) { return mValue ; } } ; wait ( subscriber ) ; return ( long ) subscriber . getValue ( ) ; }
The {@link FileDownloader#getSoFar(int)} request.
The {