| UserSession.java |
1 /*
2 * Copyright 2000-2001,2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /*
18
19 */
20
21 package org.apache.wsrp4j.consumer;
22
23 import java.util.Iterator;
24
25 import org.apache.wsrp4j.exception.WSRPException;
26
27 /**
28 * A consumer based session which represents a user session with a certain producer.
29 * This user session contains one or more group sessions.
30 *
31 * @see GroupSession
32 *
33 * @author <a href="mailto:stephan.laertz@de.ibm.com">Stephan Laertz</a>
34 * @author <a href='mailto:peter.fischer@de.ibm.com'>Peter Fischer</a>
35 **/
36 public interface UserSession {
37
38 /**
39 * Get ID of the user this session is bind to
40 *
41 * @return User ID
42 **/
43 public String getUserID();
44
45 /**
46 * Get ID of the producer this session is bind to
47 *
48 * @return ID of the producer
49 **/
50 public String getProducerID();
51
52 /**
53 * Get the group session for this group ID
54 *
55 * @param groupID ID of the portlet application
56 * @return The a group session for the provided group ID or a new groupSession
57 **/
58 public GroupSessionMgr getGroupSession(String groupID) throws WSRPException;
59
60 /**
61 * Get all group session
62 *
63 * @return Iterator with all group sessions for the given producer access point
64 **/
65 public Iterator getAllGroupSessions();
66
67 /**
68 * Set the ID of the user this session is bind to
69 *
70 * @param userID ID of the user
71 **/
72 public void setUserID(String userID);
73
74 /**
75 * Set the ID of the producer this session is bind to.
76 *
77 * @param producerID of the producer
78 **/
79 public void setProducerID(String producerID);
80
81 /**
82 * Add a group session to the user session
83 *
84 * @param groupSession A group session
85 **/
86 public void addGroupSession(GroupSession groupSession);
87
88 /**
89 * Remove a group session from the user session
90 *
91 * @param groupID ID of the portlet application
92 **/
93 public void removeGroupSession(String groupID);
94
95 /**
96 * Remove all group sessions
97 *
98 **/
99 public void removeAllGroupSessions();
100 }