|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttecgraf.ftc_1_2.server.Session
public final class Session
Representa uma sessão de acesso a um arquivo no servidor.
| Method Summary | |
|---|---|
void |
close(ChannelClosedReason reason)
Fecha a sessão. |
boolean |
closeFileChannel(ChannelClosedReason reason)
Fecha o canal do arquivo e notifica ao servidor de arquivos sobre - * este fechamento. |
ByteBuffer |
getBuffer()
Obtém o buffer para comunicação com o cliente. |
SocketChannel |
getChannel()
Obtém o canal de comunicação com o cliente. |
State |
getCurrentState()
Obtém o estado corrente. |
FileChannel |
getFileChannel()
Obtém o canal do arquivo. |
FileChannelRequestInfo |
getFileChannelInfo()
Obtém informações sobre a requisição do canal de arquivos. |
FileServer |
getFileServer()
Obtém o servidor de arquivos. |
long |
getLastActivity()
Retorna o hora (milisegundos) da ultima atividade realizada. |
boolean |
isReadOnly()
Verifica se o canal do arquivo foi aberto como somente leitura. |
void |
markLastActivity()
|
void |
setCurrentState(State state)
Define o estado corrente. |
void |
setFileChannel(FileChannel fileChannel)
Define o canal do arquivo. |
void |
setFileChannelInfo(FileChannelRequestInfo fileChannelInfo)
Define as informações sobre a requisição do canal de arquivos. |
void |
setReadOnly(boolean readOnly)
Define se o canal do arquivo foi aberto como somente leitura. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public SocketChannel getChannel()
public ByteBuffer getBuffer()
public FileServer getFileServer()
public State getCurrentState()
public void setCurrentState(State state)
state - O estado corrente.public FileChannelRequestInfo getFileChannelInfo()
public void setFileChannelInfo(FileChannelRequestInfo fileChannelInfo)
fileChannelInfo - Informações sobre a requisição do canal de arquivos.public FileChannel getFileChannel()
null, caso não tenha sido definido.public void setFileChannel(FileChannel fileChannel)
fileChannel - O canal do arquivo.public boolean isReadOnly()
true caso o canal do arquivo tenha sido aberto como somente
leitura, ou false.public void setReadOnly(boolean readOnly)
readOnly - true caso o canal do arquivo tenha sido aberto como
somente leitura, ou false.public void close(ChannelClosedReason reason)
public boolean closeFileChannel(ChannelClosedReason reason)
reason - Razão do fechamento do canal.
true caso o arquivo tenha sido aberto anteriormente ou
false, caso contrário.public long getLastActivity()
public void markLastActivity()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||