public final class DefaultUniqueTicketIdGenerator extends Object implements UniqueTicketIdGenerator
UniqueTicketIdGenerator. Implementation
utilizes a DefaultLongNumericGeneraor and a DefaultRandomStringGenerator to
construct the ticket id.
Tickets are of the form [PREFIX]-[SEQUENCE NUMBER]-[RANDOM STRING]-[SUFFIX]
| Constructor and Description |
|---|
DefaultUniqueTicketIdGenerator()
Creates an instance of DefaultUniqueTicketIdGenerator with default values
including a
DefaultLongNumericGenerator with a starting value of
1. |
DefaultUniqueTicketIdGenerator(int maxLength)
Creates an instance of DefaultUniqueTicketIdGenerator with a specified
maximum length for the random portion.
|
DefaultUniqueTicketIdGenerator(int maxLength,
String suffix)
Creates an instance of DefaultUniqueTicketIdGenerator with a specified
maximum length for the random portion.
|
DefaultUniqueTicketIdGenerator(String suffix)
Creates an instance of DefaultUniqueTicketIdGenerator with default values
including a
DefaultLongNumericGenerator with a starting value of
1. |
public DefaultUniqueTicketIdGenerator()
DefaultLongNumericGenerator with a starting value of
1.public DefaultUniqueTicketIdGenerator(int maxLength)
maxLength - the maximum length of the random string used to generate
the id.public DefaultUniqueTicketIdGenerator(String suffix)
DefaultLongNumericGenerator with a starting value of
1.suffix - the value to append at the end of the unique id to ensure
uniqueness across JVMs.public DefaultUniqueTicketIdGenerator(int maxLength,
String suffix)
maxLength - the maximum length of the random string used to generate
the id.suffix - the value to append at the end of the unique id to ensure
uniqueness across JVMs.public String getNewTicketId(String prefix)
UniqueTicketIdGeneratorgetNewTicketId in interface UniqueTicketIdGeneratorprefix - The prefix we want attached to the ticket.Copyright © 2004-2015 Apereo. All Rights Reserved.