|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--rath.msnm.ftp.VolatileTransferServer
메신져에서 서로 파일전송을 할때, 송신측에서 특정 port를 bind하고 새롭게 연결을 맺어 메시지를 주고 받는데에 사용되는 server이다.
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Method Summary | |
void |
close()
|
protected void |
fireError(Throwable e)
파일 전송도중 예기치 못한 예외가 발생하였을때, 불려진다. |
protected void |
fireStart()
|
String |
getAuthCookie()
접속된 수신자가 올바른 수신자인지 검사하기 위한 인증쿠기값을 반환한다. |
int |
getCommitPercent()
실제로 송/수신된 바이트 크기를 얻어온다. |
String |
getCookie()
|
File |
getFile()
전송되는 파일객체를 반환한다. |
String |
getFilename()
송/수신되고 있는 파일의 이름을 얻어온다. |
static VolatileTransferServer |
getInstance(MSNMessenger msn,
ToSendFile tosend,
FileTransferMessage msg)
VolatileTransferServer의 인스턴스를 생성한다. |
int |
getPort()
이 서버가 파일송신에 사용하는 port번호를 반환한다. |
int |
getPostedLength()
현재 실제로 상대peer에 전송된 byte의 수를 반환한다. |
String |
getReceiverName()
파일을 수신받는 사람의 LoginName을 반환한다. |
protected void |
makeConnection()
주어진 ServerSocket으로 설정된 port를 bind하고 관련 Stream을 생성한다. |
void |
processMessage(String header,
String body)
|
void |
run()
Thread main loop 처리 부분이다. |
void |
sendFileContent()
|
void |
sendMessage(String header,
String body)
|
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public static VolatileTransferServer getInstance(MSNMessenger msn,
ToSendFile tosend,
FileTransferMessage msg)
throws FileNotFoundException
FileNotFoundExceptionpublic int getPort()
public String getReceiverName()
public String getAuthCookie()
public String getCookie()
public File getFile()
public String getFilename()
VolatileTransfer
getFilename in interface VolatileTransferpublic int getPostedLength()
public int getCommitPercent()
VolatileTransfer
getCommitPercent in interface VolatileTransferpublic final void run()
run in interface Runnablerun in class Thread
public void processMessage(String header,
String body)
throws Throwable
Throwable
public void sendMessage(String header,
String body)
throws IOException
IOException
public void sendFileContent()
throws IOException,
InterruptedException
IOException
InterruptedExceptionpublic void close()
protected void fireStart()
protected void fireError(Throwable e)
protected void makeConnection()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||