org.apache.shiro.session.mgt.eis
Class JavaUuidSessionIdGenerator

java.lang.Object
  extended by org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator
All Implemented Interfaces:
SessionIdGenerator

public class JavaUuidSessionIdGenerator
extends Object
implements SessionIdGenerator

SessionIdGenerator that generates String values of JDK UUID's as the session IDs.

Since:
1.0

Constructor Summary
JavaUuidSessionIdGenerator()
           
 
Method Summary
 Serializable generateId(Session session)
          Ignores the method argument and simply returns UUID.randomUUID().toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaUuidSessionIdGenerator

public JavaUuidSessionIdGenerator()
Method Detail

generateId

public Serializable generateId(Session session)
Ignores the method argument and simply returns UUID.randomUUID().toString().

Specified by:
generateId in interface SessionIdGenerator
Parameters:
session - the Session instance to which the ID will be applied.
Returns:
the String value of the JDK's next randomUUID().


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.