01: package com.coldcore.coloradoftp.session;
02:
03: import com.coldcore.coloradoftp.connection.ControlConnection;
04:
05: import java.util.Set;
06:
07: /**
08: * User session.
09: *
10: * This object is available from a control connection and it is created for every user.
11: * Session is used to store and exchange user-related information. All FTP commands and
12: * other implementations who need to store or get user-related data should use user session.
13: *
14: *
15: * ColoradoFTP - The Open Source FTP Server (http://cftp.coldcore.com)
16: */
17: public interface Session {
18:
19: /** Set session attribute
20: * @param key Key
21: * @param value Value
22: */
23: public void setAttribute(String key, Object value);
24:
25: /** Get session attribute
26: * @param key Key
27: * @return Attribute value
28: */
29: public Object getAttribute(String key);
30:
31: /** Remove session attribute
32: * @param key Key
33: */
34: public void removeAttribute(String key);
35:
36: /** Get names of all session attributes
37: * @return Set with names
38: */
39: public Set<String> getAttributeNames();
40:
41: /** Get control connection of this session
42: * @return Control connection
43: */
44: public ControlConnection getControlConnection();
45:
46: /** Set control connection of this session
47: * @param controlConnection Control connection
48: */
49: public void setControlConnection(ControlConnection controlConnection);
50:
51: }
|