1 18 package net.sf.drftpd.event; 19 20 import java.net.InetAddress ; 21 22 import net.sf.drftpd.master.RemoteSlave; 23 import net.sf.drftpd.master.usermanager.User; 24 import net.sf.drftpd.remotefile.LinkedRemoteFileInterface; 25 26 30 public class TransferEvent extends DirectoryFtpEvent { 31 private boolean _complete; 32 private InetAddress _peer; 33 34 private RemoteSlave _rslave; 35 private char _type; 36 private InetAddress _clientHost; 37 38 43 public TransferEvent( 44 User user, 45 String command, 46 LinkedRemoteFileInterface directory, 47 InetAddress clientHost, 48 RemoteSlave rslave, 49 InetAddress peer, 50 char type, 51 boolean complete) { 52 this( 53 user, 54 command, 55 directory, 56 clientHost, 57 rslave, 58 peer, 59 type, 60 complete, 61 System.currentTimeMillis()); 62 } 63 64 public TransferEvent( 65 User user, 66 String command, 67 LinkedRemoteFileInterface directory, 68 InetAddress clientHost, 69 RemoteSlave rslave, 70 InetAddress peer, 71 char type, 72 boolean complete, 73 long time) { 74 super(user, command, directory, time); 75 _clientHost = clientHost; 76 _rslave = rslave; 77 if(peer == null) throw new NullPointerException (); 78 _peer = peer; 79 _complete = complete; 80 _type = type; 81 } 82 83 public char getType() { 84 return _type; 85 } 86 87 public InetAddress getClientHost() { 88 return _clientHost; 89 } 90 91 public InetAddress getXferHost() { 92 return _peer; 93 } 94 95 98 public boolean isComplete() { 99 return _complete; 100 } 101 102 public InetAddress getPeer() { 103 return _peer; 104 } 105 } 106 | Popular Tags |