KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > coldcore > coloradoftp > session > Session


1 package com.coldcore.coloradoftp.session;
2
3 import com.coldcore.coloradoftp.connection.ControlConnection;
4
5 import java.util.Set JavaDoc;
6
7 /**
8  * User session.
9  *
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 JavaDoc key, Object JavaDoc value);
24
25
26   /** Get session attribute
27    * @param key Key
28    * @return Attribute value
29    */

30   public Object JavaDoc getAttribute(String JavaDoc key);
31
32
33   /** Remove session attribute
34    * @param key Key
35    */

36   public void removeAttribute(String JavaDoc key);
37
38
39   /** Get names of all session attributes
40    * @return Set with names
41    */

42   public Set JavaDoc<String JavaDoc> getAttributeNames();
43
44
45   /** Get control connection of this session
46    * @return Control connection
47    */

48   public ControlConnection getControlConnection();
49
50
51   /** Set control connection of this session
52    * @param controlConnection Control connection
53    */

54   public void setControlConnection(ControlConnection controlConnection);
55
56 }
57
Popular Tags