Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.rest
Class DefaultSessionManager

    java.lang.Object
      com.atlassian.bamboo.rest.DefaultSessionManager

All Implemented Interfaces:
  SessionManager

    public class DefaultSessionManager

extends Object
implements SessionManager

This class manages user rest api sessions.

Field Summary
`static long` | `DEFAULT_TIMEOUT`

Constructor Summary
`DefaultSessionManager(BambooUserManager bambooUserManager)` Default constructor that uses the default user timeout
`DefaultSessionManager(long sessionTimeout, BambooUserManager bambooUserManager)` Custom constructor to control the length of the timeout

Method Summary
`String` | `getUserNameFromSession(String sessionId)` What is the username associated with this session?
`String` | `login(String username, String password)` Allow remote users to login to bamboo, providing them with a session id to pass into remote methods.
`void` | `logout(String sessionId)` Log users out of the session

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_TIMEOUT

    public static long DEFAULT_TIMEOUT

Constructor Detail

### DefaultSessionManager

    public DefaultSessionManager(BambooUserManager bambooUserManager)

  Default constructor that uses the default user timeout

### DefaultSessionManager

    public DefaultSessionManager(long sessionTimeout,
                                 BambooUserManager bambooUserManager)

  Custom constructor to control the length of the timeout

  Parameters:
    `sessionTimeout` - How much inactive use before the user's session timesout?

Method Detail

### login

    public String login(String username,
                        String password)
                 throws BambooRemoteException

  Allow remote users to login to bamboo, providing them with a session id to pass into remote methods.

  Specified by:
    `login` in interface `SessionManager`
  Parameters:
    `username` - The username we want to login under
    `password` - The password associatedd with the username
  Returns:
    The session id for this user
  Throws:
    `BambooRemoteException` - Failed to login

### logout

    public void logout(String sessionId)

  Log users out of the session

  Specified by:
    `logout` in interface `SessionManager`
  Parameters:
    `sessionId` - The session identifer

### getUserNameFromSession

    public String getUserNameFromSession(String sessionId)
                                  throws BambooRemoteException

  What is the username associated with this session?

  Specified by:
    `getUserNameFromSession` in interface `SessionManager`
  Parameters:
    `sessionId` - The session identifier
  Returns:
    The session's username
  Throws:
    `BambooRemoteException` - Unknown or timed out session,

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.