cz.zcu.ups.arcaoftpd.connection
Class ActiveConnection

java.lang.Object
  extended by java.lang.Thread
      extended by cz.zcu.ups.arcaoftpd.connection.Connection
          extended by cz.zcu.ups.arcaoftpd.connection.ActiveConnection
All Implemented Interfaces:
Runnable

public class ActiveConnection
extends Connection

Trida obsluhuje aktivni pripojeni klienta

Author:
Arcao

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ActiveConnection(ClientParameters clientParameters, SocketAddress destination)
          Konstruktor tridy
 
Method Summary
 void dispose()
          Uvolni pouzite prostredky
 SocketAddress getDestination()
          Vraci cil, na kterem ceka klient na pripojeni serveru
 void run()
          Funkce vykonajici pripojeni ke klientovi a spusteni prirazene akce
 ActiveConnection setDestination(SocketAddress destination)
          Nastavuje cil, na kterem ceka klient na pripojeni serveru
 
Methods inherited from class cz.zcu.ups.arcaoftpd.connection.Connection
connect, getAction, getClientParameters, getSocket, setAction, setClientParameters, setSocket
 
Methods inherited from class java.lang.Thread
activeCount, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActiveConnection

public ActiveConnection(ClientParameters clientParameters,
                        SocketAddress destination)
Konstruktor tridy

Parameters:
clientParameters - informace o pripojenem klientovi
destination - adresa a port klienta, na kterem klient ceka na pripojeni serveru
Method Detail

setDestination

public ActiveConnection setDestination(SocketAddress destination)
Nastavuje cil, na kterem ceka klient na pripojeni serveru

Parameters:
destination - adresa a port, na kterem nasloucha klient
Returns:
eference na (this) ActiveConnection

getDestination

public SocketAddress getDestination()
Vraci cil, na kterem ceka klient na pripojeni serveru

Returns:
adresa a port, na kterem nasloucha klient

run

public void run()
Funkce vykonajici pripojeni ke klientovi a spusteni prirazene akce

Specified by:
run in interface Runnable
Specified by:
run in class Connection

dispose

public void dispose()
Uvolni pouzite prostredky

Specified by:
dispose in class Connection