Package transfer.upload

Source Code of transfer.upload.FileUpload$UploadStatus

package transfer.upload;


import common.files.NamedFile;
import common.files.SerializableFile;

import transfer.AbstractFileTransfer;

import static main.ClientMain.*;


public class FileUpload extends AbstractFileTransfer
{
  @SuppressWarnings("serial")
  private static class UploadStatus extends AbstractStatus
  {
    public static final UploadStatus UPLOADING = new UploadStatus("uploading");

    protected UploadStatus(String name)
    {
      super(name);
    }

  }

  public FileUpload(SerializableFile file, FileUploadConnection connection)
  {
    super(new NamedFile(file, getSharedFilesTable().getFirstNameOf(file)));

    setConnection(connection);
    transitTo(UploadStatus.UPLOADING);
  }

  public void addToManager()
  {
    getUploadManager().addUpload(this);
  }

  public void removeFromManager()
  {
    getUploadManager().removeUpload(this);
  }

}
TOP

Related Classes of transfer.upload.FileUpload$UploadStatus

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.