org.apache.shiro.session.mgt.eis
Class RandomSessionIdGenerator
java.lang.Object
org.apache.shiro.session.mgt.eis.RandomSessionIdGenerator
- All Implemented Interfaces:
- SessionIdGenerator
public class RandomSessionIdGenerator
- extends Object
- implements SessionIdGenerator
Generates session IDs by using a Random
instance to generate random IDs. The default Random
implementation is a SecureRandom
with the SHA1PRNG
algorithm.
- Since:
- 1.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomSessionIdGenerator
public RandomSessionIdGenerator()
getRandom
public Random getRandom()
setRandom
public void setRandom(Random random)
generateId
public Serializable generateId(Session session)
- Returns the String value of the configured
Random
's nextLong()
invocation.
- Specified by:
generateId
in interface SessionIdGenerator
- Parameters:
session
- the Session
instance to which the ID will be applied.
- Returns:
- the String value of the configured
Random
's Random.nextLong()
invocation.
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.