|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Session
Represents an FTP session state and behavior
| Method Summary | |
|---|---|
void |
close()
Close the session, closing the underlying sockets |
void |
closeDataConnection()
Close the data connection |
Object |
getAttribute(String name)
Return the attribute value for the specified name. |
Set |
getAttributeNames()
Return the Set of names under which attributes have been stored on this session. |
InetAddress |
getClientHost()
Return the InetAddress representing the client host for this session |
InetAddress |
getServerHost()
Return the InetAddress representing the server host for this session |
void |
openDataConnection()
Open the data connection, attaching to the predefined port number on the client |
byte[] |
readData()
Read data from the client across the data connection |
byte[] |
readData(int numBytes)
Read and return (up to) numBytes of data from the client across the data connection |
void |
removeAttribute(String name)
Remove the attribute value for the specified name. |
void |
sendData(byte[] data,
int numBytes)
Write the specified data using the data connection |
void |
sendReply(int replyCode,
String replyText)
Send the specified reply code and text across the control connection. |
void |
setAttribute(String name,
Object value)
Store the value under the specified attribute name. |
void |
setClientDataHost(InetAddress clientHost)
|
void |
setClientDataPort(int clientDataPort)
|
int |
switchToPassiveMode()
Switch to passive mode |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Method Detail |
|---|
void close()
void sendReply(int replyCode,
String replyText)
replyCode - - the reply codereplyText - - the reply text to send; may be nullvoid openDataConnection()
void closeDataConnection()
int switchToPassiveMode()
void sendData(byte[] data,
int numBytes)
data - - the data to writenumBytes - - the number of bytes from data to sendbyte[] readData()
byte[] readData(int numBytes)
InetAddress getClientHost()
InetAddress getServerHost()
void setClientDataHost(InetAddress clientHost)
clientHost - - the client host for the data connectionvoid setClientDataPort(int clientDataPort)
clientDataPort - - the port number on the client side for the data connectionObject getAttribute(String name)
name - - the attribute name; may not be null
AssertFailedException - - if name is null
void setAttribute(String name,
Object value)
name - - the attribute name; may not be nullvalue - - the attribute value; may be null
AssertFailedException - - if name is nullvoid removeAttribute(String name)
name - - the attribute name; may not be null
AssertFailedException - - if name is nullSet getAttributeNames()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||