|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--SOMA.network.connection.Connection
Demone responsabile delle comunicazioni via socket con un altro place.
NewClientExplorerItem
Constructor Summary | |
protected |
Connection()
Costruttore vuoto. |
|
Connection(java.net.Socket mySocket,
Environment env)
Costruttore: effettua le inizializzazioni ed apre gli stream della socket. |
Method Summary | |
int |
getStatus()
restituisce lo stato della connessione. |
void |
run()
Metodo eseguito dal demone: attende comandi e li esegue finche' lo stato rimane ON e la socket attiva. |
void |
send(Command c)
Spedisce un comando. |
void |
start()
Avvia il demone in ascolto sull'InputStream della socket. |
void |
stop()
Arresta il demone: chiude la socket e gli stream aperti, lo stato va a OFF. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
protected Connection()
public Connection(java.net.Socket mySocket, Environment env)
mySocket
- Socket utilizzata per le comunicazioni.env
- Riferimento all'environment del place.Method Detail |
public int getStatus()
public void start() throws ConnectionException
public void stop() throws java.lang.Exception
public java.lang.String toString()
public void send(Command c) throws java.io.IOException, ConnectionException
public void run()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |