All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.mmm.util.io.AsyncTransferrer Maven / Gradle / Ivy

The newest version!
/* $Id: AsyncTransferrer.java 380 2007-12-17 13:32:37Z hohwille $
 * Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0 */
package net.sf.mmm.util.io;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

/**
 * This is the interface for an async transferrer of streams or readers/writers.
 * 
 * @author Joerg Hohwiller (hohwille at users.sourceforge.net)
 */
public interface AsyncTransferrer extends Future {

  /**
   * {@inheritDoc}
   * 
   * @return the number of bytes that have been transferred.
   */
  Long get() throws InterruptedException, ExecutionException;

  /**
   * {@inheritDoc}
   * 
   * @return the number of bytes that have been transferred.
   */
  Long get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException,
      TimeoutException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy