Examples of SarosCancellationException


Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

     *             cancelled.
     */
    protected void checkCancellation() throws SarosCancellationException {
        if (cancelled.get()) {
            log.debug("Inv" + Utils.prefix(peer) + ": Cancellation checkpoint");
            throw new SarosCancellationException();
        }

        if (monitor == null)
            return;

        if (monitor.isCanceled()) {
            log.debug("Inv" + Utils.prefix(peer) + ": Cancellation checkpoint");
            localCancel(null, CancelOption.NOTIFY_PEER);
            throw new SarosCancellationException();
        }

        return;
    }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

                String projectID = new String(zipEntry.getExtra());
                IProject currentProject = localProjects.get(projectID);
                if (currentProject == null) {
                    // this is really unlikely
                    log.error("currentProject is null");
                    throw new SarosCancellationException(
                        "File did not belong to a project that is supposed to be added");
                } else {
                    log.info("everything seems to be normal");
                }
                currentFile = currentProject.getFile(zipEntry.getName());
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

     */
    protected void checkCancellation(CancelOption cancelOption)
        throws SarosCancellationException {
        if (cancelled.get()) {
            log.debug("Inv" + Utils.prefix(peer) + ": Cancellation checkpoint");
            throw new SarosCancellationException();
        }

        if (monitor == null) {
            log.warn("Inv" + Utils.prefix(peer) + ": The monitor is null.");
            return;
        }

        if (monitor.isCanceled()) {
            log.debug("Inv" + Utils.prefix(peer) + ": Cancellation checkpoint");
            localCancel(null, cancelOption);
            throw new SarosCancellationException();
        }
    }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

                    Thread.currentThread().interrupt();
                    return;
                } catch (ExecutionException e) {
                    Throwable cause = e.getCause();
                    if (cause instanceof SarosCancellationException) {
                        SarosCancellationException cancellation = (SarosCancellationException) cause;
                        throw cancellation;
                    } else {
                        log.error("Unexpected Exception: ", cause);
                    }
                    return;
                } catch (IOException e) {
                    if (streamSession != null)
                        streamSession.dispose();
                } catch (ConnectionException e) {
                    throw new SarosCancellationException("Could not connect.");
                } catch (TimeoutException e) {
                    throw new SarosCancellationException("Request timed out.");
                }
            } catch (InitializationException e) {
                log.error("Could not setup videosharing-session: ", e);
            }
        } finally {
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

     */
    protected void checkCancellation(CancelOption cancelOption)
        throws SarosCancellationException {
        if (cancelled.get()) {
            log.debug("Inv" + Utils.prefix(peer) + ": Cancellation checkpoint");
            throw new SarosCancellationException();
        }

        if (monitor == null) {
            log.warn("Inv" + Utils.prefix(peer) + ": The monitor is null.");
            return;
        }

        if (monitor.isCanceled()) {
            log.debug("Inv" + Utils.prefix(peer) + ": Cancellation checkpoint");
            localCancel(null, cancelOption);
            throw new SarosCancellationException();
        }
    }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

     *             cancelled.
     */
    protected void checkCancellation() throws SarosCancellationException {
        if (cancelled.get()) {
            log.debug("Inv" + Utils.prefix(peer) + ": Cancellation checkpoint");
            throw new SarosCancellationException();
        }

        if (monitor == null)
            return;

        if (monitor.isCanceled()) {
            log.debug("Inv" + Utils.prefix(peer) + ": Cancellation checkpoint");
            localCancel(null, CancelOption.NOTIFY_PEER);
            throw new SarosCancellationException();
        }

        return;
    }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

        SarosCancellationException {

        try {

            if (progress.isCanceled()) {
                throw new SarosCancellationException();
            }

            progress.beginTask("Compressing: " + filename, 1);
            log.debug("Compress file: " + filename);
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

            watch.start();
            try {
                while ((numRead = fileInputStream.read(buffer)) > 0
                    && streamException == null) {
                    if (monitor.isCanceled())
                        throw new SarosCancellationException();
                    if (Thread.interrupted() || stopped)
                        throw new RemoteCancellationException();

                    out.write(buffer, 0, numRead);
                    sendBytes += numRead;
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

        try {

            return connect(recipient, progress);
        } catch (InterruptedException e) {
            throw new SarosCancellationException("Connecting cancelled");
        }
    }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.SarosCancellationException

                        throw new RemoteCancellationException();
                }
                fileOutputStream.flush();

                if (monitor.isCanceled())
                    throw new SarosCancellationException();

                receivedSuccessfully = received == fileSize;

            } finally {
                IOUtils.closeQuietly(fileOutputStream);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.