|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object janus.net.ServerBase janus.net.FileTransferServer
public class FileTransferServer
Diese Klasse implementiert einen File-Transfer-Server.
Der Server empfängt eine Datei und startet danach
die Verarbeitung der Datei.
Dies ist eine Basisklasse mit leerer process(long)
-Funktion.
Field Summary | |
---|---|
protected File |
file
Datei, die empfangen wird |
protected FileOutputStream |
stream
Stream zur Datei |
protected long |
timeout
Timeout der process(long) -Methode in Millisekunden |
protected long |
total
Statitistik |
Fields inherited from class janus.net.ServerBase |
---|
conn, debug, debugStream, exceptionListener, name, replyPending, serverSet, success_hi, success_lo, thread, transaction_type, ums_alias, ums_buffer, ums_length, UMS_MAXLENGTH, ums_reply_len, ums_terminal, umsConn, umsThread, userObject |
Constructor Summary | |
---|---|
FileTransferServer()
Konstruktor - Setzt einen Standardnamen |
Method Summary | |
---|---|
protected void |
handleData()
Verarbeite eine eingehende Daten-Nachricht. |
protected void |
handleInit()
Die Init-Nachricht enthät den Dateinamen und den Timeout |
static void |
main(String[] args)
Test-Hauptprogramm |
protected byte[] |
process(long timeout)
Folgeverarbeitung. |
Methods inherited from class janus.net.ServerBase |
---|
beginTransaction, endTransaction, getConnection, getDebugStream, getName, getNextUms, getUmsConnection, getUserObject, handleAccept, handleAwaitIo, handleCancel, handleExit, handleMessage, handleTransaction, handleUms, handleUmsException, isDebug, logException, rollbackTransaction, run, sendAck, sendAck, sendError, sendError, sendError, sendReply, sendReply, sendReply, setConnection, setDebug, setDebugStream, setDebugStream, setExceptionListener, setName, setUserObject, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File file
protected FileOutputStream stream
protected long timeout
process(long)
-Methode in Millisekunden
protected long total
Constructor Detail |
---|
public FileTransferServer()
Method Detail |
---|
protected void handleData() throws Exception
handleData
in class ServerBase
Exception
ServerConnection
protected void handleInit() throws Exception
handleInit
in class ServerBase
Exception
public static void main(String[] args) throws Exception
Exception
protected byte[] process(long timeout)
timeout
- Maximal gewünschte Verarbeitungszeit in ms
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |