01: /**
02: * $RCSfile$
03: * $Revision: 1217 $
04: * $Date: 2005-04-11 18:11:06 -0300 (Mon, 11 Apr 2005) $
05: *
06: * Copyright (C) 1999-2006 Jive Software. All rights reserved.
07: *
08: * This software is published under the terms of the GNU Public License (GPL),
09: * a copy of which is included in this distribution.
10: */package org.jivesoftware.openfire.filetransfer;
11:
12: import java.util.concurrent.Future;
13: import java.io.InputStream;
14: import java.io.OutputStream;
15:
16: /**
17: * An interface to track the progress of a file transfer through the server. This interface is used
18: * by {@link FileTransfer} to make this information available if it is in the system.
19: *
20: * @author Alexander Wenckus
21: */
22: public interface FileTransferProgress {
23: public long getAmountTransfered()
24: throws UnsupportedOperationException;
25:
26: /**
27: * Returns the fully qualified JID of the initiator of the file transfer.
28: *
29: * @return the fully qualified JID of the initiator of the file transfer.
30: */
31: public String getInitiator();
32:
33: public void setInitiator(String initiator);
34:
35: /**
36: * Returns the full qualified JID of the target of the file transfer.
37: *
38: * @return the fully qualified JID of the target
39: */
40: public String getTarget();
41:
42: public void setTarget(String target);
43:
44: /**
45: * Returns the unique session id that correlates to the file transfer.
46: *
47: * @return Returns the unique session id that correlates to the file transfer.
48: */
49: public String getSessionID();
50:
51: public void setSessionID(String streamID);
52:
53: /**
54: * When the file transfer is being caried out by another thread this will set the Future
55: * relating to the thread that is carrying out the transfer.
56: *
57: * @param future the furute that is carrying out the transfer
58: */
59: public void setTransferFuture(Future<?> future);
60:
61: public void setInputStream(InputStream initiatorInputStream);
62:
63: public InputStream getInputStream();
64:
65: public void setOutputStream(OutputStream targetOutputStream);
66:
67: public OutputStream getOutputStream();
68: }
|