|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
f00f.net.irc.martyr.dcc.DccSendHandler
public class DccSendHandler
A DccSendHandler manages a DCC "send" (to us) file transfer. If you wish to use this class to handle a DCC session, provide an implementation for getStreamForReceive in a subclass.
AutoDccSetup.getDccSendHandler(java.net.Socket, java.lang.String, int),
getStreamForReceive(java.lang.String, int)| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DccSendHandler(java.net.Socket socket,
java.lang.String filename,
int filesize)
|
|
| Method Summary | |
|---|---|
protected java.io.OutputStream |
getStreamForReceive(java.lang.String filename,
int filesize)
This method should return an output stream that a file can be placed into. |
protected void |
handleDccSend(java.net.Socket socket,
java.lang.String filename,
int filesize)
A call to this method means that a connection has been established and processing the file should commence. |
void |
run()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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 |
| Constructor Detail |
|---|
public DccSendHandler(java.net.Socket socket,
java.lang.String filename,
int filesize)
| Method Detail |
|---|
protected void handleDccSend(java.net.Socket socket,
java.lang.String filename,
int filesize)
throws java.io.IOException
socket - Socket ove which send will be handledfilename - Name of file to be sentfilesize - Size of file to send
java.io.IOException - if connection could not be establishedgetStreamForReceive(java.lang.String, int)
protected java.io.OutputStream getStreamForReceive(java.lang.String filename,
int filesize)
throws java.io.IOException
filename - Name of file to be receivedfilesize - Size of file to be received
java.io.IOException - of connection could not be establishedpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||