001: /*
002: * Copyright 2000-2001,2004 The Apache Software Foundation.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: /*
018:
019: */
020:
021: package org.apache.wsrp4j.consumer;
022:
023: import java.util.Iterator;
024:
025: import org.apache.wsrp4j.exception.WSRPException;
026:
027: /**
028: * A consumer based session which represents a user session with a certain producer.
029: * This user session contains one or more group sessions.
030: *
031: * @see GroupSession
032: *
033: * @author <a href="mailto:stephan.laertz@de.ibm.com">Stephan Laertz</a>
034: * @author <a href='mailto:peter.fischer@de.ibm.com'>Peter Fischer</a>
035: **/
036: public interface UserSession {
037:
038: /**
039: * Get ID of the user this session is bind to
040: *
041: * @return User ID
042: **/
043: public String getUserID();
044:
045: /**
046: * Get ID of the producer this session is bind to
047: *
048: * @return ID of the producer
049: **/
050: public String getProducerID();
051:
052: /**
053: * Get the group session for this group ID
054: *
055: * @param groupID ID of the portlet application
056: * @return The a group session for the provided group ID or a new groupSession
057: **/
058: public GroupSessionMgr getGroupSession(String groupID)
059: throws WSRPException;
060:
061: /**
062: * Get all group session
063: *
064: * @return Iterator with all group sessions for the given producer access point
065: **/
066: public Iterator getAllGroupSessions();
067:
068: /**
069: * Set the ID of the user this session is bind to
070: *
071: * @param userID ID of the user
072: **/
073: public void setUserID(String userID);
074:
075: /**
076: * Set the ID of the producer this session is bind to.
077: *
078: * @param producerID of the producer
079: **/
080: public void setProducerID(String producerID);
081:
082: /**
083: * Add a group session to the user session
084: *
085: * @param groupSession A group session
086: **/
087: public void addGroupSession(GroupSession groupSession);
088:
089: /**
090: * Remove a group session from the user session
091: *
092: * @param groupID ID of the portlet application
093: **/
094: public void removeGroupSession(String groupID);
095:
096: /**
097: * Remove all group sessions
098: *
099: **/
100: public void removeAllGroupSessions();
101: }
|