|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.commons.IdGeneratorImpl
public class IdGeneratorImpl
Simple implementation of the IdGenerator interface to generate unique ids.
domainName instance variable to something in order to make the id even more
unique. Can be set programmatically through the constructor (or the setter) or through Spring bean context XML via dependency
injection.
If domainName is null, then the id will be: <11 random alpha numeric characters> + "-" + domainName is not null then the id will be:
| Constructor Summary | |
|---|---|
IdGeneratorImpl()
Default constructor. |
|
IdGeneratorImpl(String domainName)
Constructs an ID generator with the given domain name to use as the prefix of the ID. |
|
| Method Summary | |
|---|---|
String |
generateId()
Generates a globally unique id. |
void |
setDomainName(String domainName)
Sets the domain name to use when generating ids. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IdGeneratorImpl()
public IdGeneratorImpl(String domainName)
domainName - A domain name to be used in generated ids| Method Detail |
|---|
public String generateId()
generateId in interface IdGeneratorpublic void setDomainName(String domainName)
domainName will prefix the id. See the Javadoc for this
class for more info.
Note: This can be any String, but since domain names are unique per content provider it is a good way to ensure your push
ids are unique to your push application.
domainName - the value to prefix the id with
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||