extensions/net.sf.basedb.opengrid/trunk/src/net/sf/basedb/opengrid/filetransfer/UploadSource.java

Code
Comments
Other
Rev Date Author Line
4121 22 Sep 16 nicklas 1 package net.sf.basedb.opengrid.filetransfer;
4121 22 Sep 16 nicklas 2
4121 22 Sep 16 nicklas 3 import java.io.IOException;
4121 22 Sep 16 nicklas 4 import java.io.InputStream;
4121 22 Sep 16 nicklas 5
4121 22 Sep 16 nicklas 6 /**
4121 22 Sep 16 nicklas 7   Represents a local file or resource that can be uploaded
4121 22 Sep 16 nicklas 8   as a file to a remote server.
4121 22 Sep 16 nicklas 9   
4121 22 Sep 16 nicklas 10   @author nicklas
4121 22 Sep 16 nicklas 11   @since 1.0
4121 22 Sep 16 nicklas 12 */
4121 22 Sep 16 nicklas 13 public interface UploadSource 
4121 22 Sep 16 nicklas 14 {
4121 22 Sep 16 nicklas 15   
4121 22 Sep 16 nicklas 16   /**
4121 22 Sep 16 nicklas 17     The name of the resource.
4121 22 Sep 16 nicklas 18   */
4121 22 Sep 16 nicklas 19   public String getName();
4121 22 Sep 16 nicklas 20   
4121 22 Sep 16 nicklas 21   /**
4124 23 Sep 16 nicklas 22     Get a metadata instance with information about
4124 23 Sep 16 nicklas 23     the local file that is about to be uploaded. This method
4124 23 Sep 16 nicklas 24     is called before the {@link #getInputStream()} is called.
4124 23 Sep 16 nicklas 25     
4124 23 Sep 16 nicklas 26     @return A metadata instance or null if no metadata is known
4121 22 Sep 16 nicklas 27   */
4124 23 Sep 16 nicklas 28   public FileMetaData getMetadata();
4124 23 Sep 16 nicklas 29
4121 22 Sep 16 nicklas 30   /**
4121 22 Sep 16 nicklas 31     Get an input stream for reading the resource data.
4121 22 Sep 16 nicklas 32   */
4121 22 Sep 16 nicklas 33   public InputStream getInputStream()
4121 22 Sep 16 nicklas 34     throws IOException;
4121 22 Sep 16 nicklas 35 }