Package de.fu_berlin.inf.dpp.exceptions

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


                cancelMessage = "Sharing project was cancelled by local user.";
                log.debug("Inv" + Utils.prefix(peer) + ": " + cancelMessage);
            }

        } else if (cancellationCause instanceof RemoteCancellationException) {
            RemoteCancellationException e = (RemoteCancellationException) cancellationCause;
            errorMsg = e.getMessage();
            if (errorMsg != null) {
                cancelMessage = MessageFormat
                    .format(
                        "Sharing project was cancelled by the remote user because of an error on his/her side: {0}",
                        errorMsg);
View Full Code Here


            + Utils.prefix(peer)
            + ": remoteCancel "
            + (errorMsg == null ? " by user" : " because of error: " + errorMsg));
        if (monitor != null)
            monitor.setCanceled(true);
        cancellationCause = new RemoteCancellationException(errorMsg);
        if (monitor == null) {
            log.debug("Inv" + Utils.prefix(peer)
                + ": Closing JoinSessionWizard manually.");
            try {
                executeCancellation();
View Full Code Here

        if (!cancelled.compareAndSet(false, true))
            return;
        log.debug("Inv" + Utils.prefix(peer) + ": remoteCancel: " + errorMsg);
        if (monitor != null)
            monitor.setCanceled(true);
        cancellationCause = new RemoteCancellationException(errorMsg);
    }
View Full Code Here

                log.debug("Inv" + Utils.prefix(peer) + ": " + cancelMessage);
                monitor.setTaskName("Invitation has been cancelled.");
            }

        } else if (cancellationCause instanceof RemoteCancellationException) {
            RemoteCancellationException e = (RemoteCancellationException) cancellationCause;

            errorMsg = e.getMessage();
            if (errorMsg != null) {
                cancelMessage = "Invitation was cancelled by the remote user "
                    + " because of an error on his/her side: " + errorMsg;
                log.error("Inv" + Utils.prefix(peer) + ": " + cancelMessage);
                monitor.setTaskName("Invitation failed.");
View Full Code Here

                log.debug("Inv" + Utils.prefix(peer) + ": " + cancelMessage);
                monitor.setTaskName("Invitation has been cancelled.");
            }

        } else if (cancellationCause instanceof RemoteCancellationException) {
            RemoteCancellationException e = (RemoteCancellationException) cancellationCause;

            errorMsg = e.getMessage();
            if (errorMsg != null) {
                cancelMessage = "Invitation was cancelled by the remote user "
                    + " because of an error on his/her side: " + errorMsg;
                log.error("Inv" + Utils.prefix(peer) + ": " + cancelMessage);
                monitor.setTaskName("Invitation failed.");
View Full Code Here

        if (!cancelled.compareAndSet(false, true))
            return;
        log.debug("Inv" + Utils.prefix(peer) + ": remoteCancel: " + errorMsg);
        if (monitor != null)
            monitor.setCanceled(true);
        cancellationCause = new RemoteCancellationException(errorMsg);
    }
View Full Code Here

                cancelMessage = "Invitation was cancelled by local user.";
                log.debug("Inv" + Utils.prefix(peer) + ": " + cancelMessage);
            }

        } else if (cancellationCause instanceof RemoteCancellationException) {
            RemoteCancellationException e = (RemoteCancellationException) cancellationCause;
            errorMsg = e.getMessage();
            if (errorMsg != null) {
                cancelMessage = "Invitation was cancelled by the remote user "
                    + " because of an error on his/her side: " + errorMsg;
                log.error("Inv" + Utils.prefix(peer) + ": " + cancelMessage);
            } else {
View Full Code Here

            + Utils.prefix(peer)
            + ": remoteCancel "
            + (errorMsg == null ? " by user" : " because of error: " + errorMsg));
        if (monitor != null)
            monitor.setCanceled(true);
        cancellationCause = new RemoteCancellationException(errorMsg);
        if (monitor == null) {
            log.debug("Inv" + Utils.prefix(peer)
                + ": Closing JoinSessionWizard manually.");
            try {
                executeCancellation();
View Full Code Here

            // send TRANSFERDESCRIPTION
            sendDirect(PacketType.TRANSFERDESCRIPTION, countDescription,
                objectid, descData, progress);

            if (isRejected(objectid))
                throw new RemoteCancellationException();

            // send DATA
            sendDirect(PacketType.DATA, countData, objectid, data, progress);

            BinaryPacket confirmation = null;
            try {
                while (confirmation == null && isConnected()
                    && !progress.isCanceled()) {
                    confirmation = remoteTransfers.get(objectid).poll(500,
                        TimeUnit.MILLISECONDS);
                }
            } catch (InterruptedException e) {
                log.error("Code not designed to be interrupted", e);
                throw new CausedIOException(
                    "Binary Channel received unexpected exception while waiting for confirmation package",
                    e);
            }
            if (confirmation == null)
                throw new IOException(
                    "Binary Channel was closed while waiting for confirmation package");

            if (confirmation.getType() == PacketType.REJECT)
                throw new RemoteCancellationException();

            assert confirmation.getType() == PacketType.FINISHED;

        } catch (LocalCancellationException e) {
View Full Code Here

        try {
            session = initiationProcess.get(timeout, TimeUnit.SECONDS);
        } catch (ExecutionException e) {
            Throwable cause = e.getCause();
            if (cause instanceof RemoteCancellationException) {
                RemoteCancellationException remoteCancellationException = (RemoteCancellationException) cause;
                throw remoteCancellationException;
            }
            log.error("Unknown error during negotiation: ", e.getCause());
            throw e;
        } finally {
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.exceptions.RemoteCancellationException

Copyright © 2018 www.massapicom. 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.