|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Observable
FileClient
This class start file transfer in a thread
| Constructor Summary | |
FileClient(File f)
Assign file reference to transfer |
|
| Method Summary | |
boolean |
Alive()
Check the liveness of Thread |
String |
getIP()
Find Remote IP Address of connected socket |
int |
getPort()
Find Local port of connected socket |
String |
getStatus()
Find and return thread status message |
void |
run()
Thread run method |
void |
setObserver(View v)
Set the Observer for Observable |
void |
startClient(String IP,
int Port)
Connect with server and start file transferring thread |
void |
stopClient()
stop thread and close socket |
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileClient(File f)
f - File to transfer| Method Detail |
public boolean Alive()
public String getIP()
public int getPort()
public String getStatus()
public void run()
run in interface Runnablepublic void setObserver(View v)
v - Observer Object
public void startClient(String IP,
int Port)
throws Exception
IP - IP Address of serverPort - port number of server
Exception - If unable to connect to server on specified IP addres and port numberpublic void stopClient()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||