SessionManager (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.auth.shared.SessionManager class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.auth.shared
Class SessionManager

    java.lang.Object
      org.hyperic.hq.auth.shared.SessionManager

    public class SessionManager

extends java.lang.Object

Method Summary
`void` | `authenticate(int sessionId)` Simply perform an authentication when you don't need the actual subject
`java.lang.Integer` | `getId(int sessionId)` Returns a userid given a session id
`int` | `getIdFromUsername(java.lang.String username)` Lookup and return sessionId given their username.
`static SessionManager` | `getInstance()`
`AuthzSubject` | `getSubject(int sessionId)`
`AuthzSubject` | `getSubject(java.lang.Integer sessionId)`
`void` | `invalidate(int sessionId)` Remove the indicated session
`int` | `put(AuthzSubject subject)` Associates a userid with a session id.
`int` | `put(AuthzSubject subject, long timeout)` Associates a userid with a session id

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

Method Detail

### getInstance

    public static SessionManager getInstance()

### put

    public int put(AuthzSubject subject)

  Associates a userid with a session id. Uses default timeout.

  Parameters:
    `subject` - The AuthzSubjectValue to store
  Returns:
    The session id

### put

    public int put(AuthzSubject subject,
                   long timeout)

  Associates a userid with a session id

  Parameters:
    `subject` - The AuthzSubjectValue to store
    `timeout` - The timeout for the session in milliseconds
  Returns:
    The session id

### getIdFromUsername

    public int getIdFromUsername(java.lang.String username)
                          throws SessionNotFoundException,
                                 SessionTimeoutException

  Lookup and return sessionId given their username.

  Parameters:
    `username` - The username.
  Returns:
    sessionId
  Throws:
    `SessionNotFoundException`
    `SessionTimeoutException`

### getId

    public java.lang.Integer getId(int sessionId)
                            throws SessionNotFoundException,
                                   SessionTimeoutException

  Returns a userid given a session id

  Parameters:
    `sessionId` - The session id
  Returns:
    The user id
  Throws:
    `SessionNotFoundException`
    `SessionTimeoutException`

### getSubject

    public AuthzSubject getSubject(java.lang.Integer sessionId)
                            throws SessionNotFoundException,
                                   SessionTimeoutException

  Throws:
    `SessionNotFoundException`
    `SessionTimeoutException`

### getSubject

    public AuthzSubject getSubject(int sessionId)
                            throws SessionNotFoundException,
                                   SessionTimeoutException

  Throws:
    `SessionNotFoundException`
    `SessionTimeoutException`

### authenticate

    public void authenticate(int sessionId)
                      throws SessionNotFoundException,
                             SessionTimeoutException

  Simply perform an authentication when you don't need the actual subject

  Throws:
    `SessionNotFoundException`
    `SessionTimeoutException`

### invalidate

    public void invalidate(int sessionId)

  Remove the indicated session

  Parameters:
    `sessionId` - The session id

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.