Package org.apache.maven.wagon.events

Examples of org.apache.maven.wagon.events.TransferEvent


        return this.transferListeners.contains(transferListener);
    }

    @Override
    public void fireTransferInitiated(Resource resource, int requestType) {
        TransferEvent event = new TransferEvent(this.wagon, resource, TransferEvent.TRANSFER_INITIATED, requestType);
        for (TransferListener transferListener : this.transferListeners) {
            transferListener.transferInitiated(event);
        }
    }
View Full Code Here


        }
    }

    @Override
    public void fireTransferStarted(Resource resource, int requestType) {
        TransferEvent event = new TransferEvent(this.wagon, resource, TransferEvent.TRANSFER_STARTED, requestType);
        for (TransferListener transferListener : this.transferListeners) {
            transferListener.transferStarted(event);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void fireTransferProgress(Resource resource, int requestType, byte[] buffer, int length) {
        TransferEvent event = new TransferEvent(this.wagon, resource, TransferEvent.TRANSFER_PROGRESS, requestType);
        for (TransferListener transferListener : this.transferListeners) {
            transferListener.transferProgress(event, buffer, length);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void fireTransferCompleted(Resource resource, int requestType) {
        TransferEvent event = new TransferEvent(this.wagon, resource, TransferEvent.TRANSFER_COMPLETED, requestType);
        for (TransferListener transferListener : this.transferListeners) {
            transferListener.transferCompleted(event);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void fireTransferError(Resource resource, int requestType, Exception exception) {
        TransferEvent event = new TransferEvent(this.wagon, resource, exception, requestType);
        for (TransferListener transferListener : this.transferListeners) {
            transferListener.transferError(event);
        }
    }
View Full Code Here

    @Test
    public void fireTransferInitiated() {
        this.transferListenerSupport.fireTransferInitiated(this.resource, REQUEST_TYPE);
        verify(this.transferListener).transferInitiated(
                eq(new TransferEvent(this.wagon, this.resource, TransferEvent.TRANSFER_INITIATED, REQUEST_TYPE)));
    }
View Full Code Here

    }

    @Test
    public void fireTransferStarted() {
        this.transferListenerSupport.fireTransferStarted(this.resource, REQUEST_TYPE);
        verify(this.transferListener).transferStarted(eq(new TransferEvent(this.wagon, this.resource,
                TransferEvent.TRANSFER_STARTED, REQUEST_TYPE)));
    }
View Full Code Here

    public void fireTransferProgress() {
        byte[] buffer = new byte[0];
        int length = 0;
        this.transferListenerSupport.fireTransferProgress(this.resource, REQUEST_TYPE, buffer, length);
        verify(this.transferListener).transferProgress(
                eq(new TransferEvent(this.wagon, this.resource, TransferEvent.TRANSFER_PROGRESS, REQUEST_TYPE)),
                Matchers.eq(buffer), Matchers.eq(length));
    }
View Full Code Here

    @Test
    public void fireTransferCompleted() {
        this.transferListenerSupport.fireTransferCompleted(this.resource, REQUEST_TYPE);
        verify(this.transferListener).transferCompleted(
                eq(new TransferEvent(this.wagon, this.resource, TransferEvent.TRANSFER_COMPLETED, REQUEST_TYPE)));
    }
View Full Code Here

    @Test
    public void fireTransferError() {
        IOException exception = new IOException();
        this.transferListenerSupport.fireTransferError(this.resource, REQUEST_TYPE, exception);
        verify(this.transferListener).transferError(eq(new TransferEvent(this.wagon, this.resource, exception,
                REQUEST_TYPE)));
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.wagon.events.TransferEvent

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.