Hi everybody,
I worked on three StringIdentifierGenerator implementations which can be useful.
These is an "ASCII javadoc summary" :
- PrefixStringIdentifierGenerator extends AbstractStringIdentifierGenerator PrefixStringIdentifier(String prefix, StringIdentifierGenerator) prefixes the identifier returns by the specified generator with the given prefix
- HostStringIdentifierGenerator extends PrefixStringIdentifierGenerator HostStringIdentifierGenerator(StringIdentifierGenerator) : uses the local hostname HostStringIdentifierGenerator(InetAddress, StringIdentifierGenerator)
- UUIDClockStringIdentifierGenerator extends AbstractStringIdentifierGenerator UUIDClockStringIdentifierGenerator(UUIDClock)
Our goal is to be able to compose a HostStringIdentifierGenerator and a UUIDClockStringIdentifierGenerator to identify messages in a network application.
PS : I can prepare a patch with these three classses. .. but not from this place, no real CVS access :o(.
Alban,
I have been playing around with similar ideas -- essentially concatenating identifiers. We may want to enable more than two identifiers to be concatentated, so I would suggest something more along the lines of a CompositeIdentifierGenerator that could wrap an array or list of IdentifierGenerators and use these to generate "composite" ids. One example of this would be a CompositeStringIdentifierGenerator that uses concatenation to combine ids. Another strategy might be concatenate, then hash, etc.
I am not sure what the best design strategy will be here, but I think the ability to compose identifiers using different composition strategies may be a good thing to have.
Another sort of related thing that I have been thinking about is attaching signatures to ids, so that their authenticity can be validated.
Phil
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
