@Component(value="gravatarService") public class GravatarServiceImpl extends Object implements GravatarService
GravatarService.| Constructor and Description |
|---|
GravatarServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheCleanup()
Cleans up the gravatar cache.
|
String |
computeHash(String mail)
Computes the Gravatar hash for a mail address.
|
File |
fetchGravatar(String hash)
Fetch a File of the Gravatar image for the given hash.
|
public GravatarServiceImpl()
public String computeHash(String mail)
GravatarServicecomputeHash in interface GravatarServicemail - Mail address to hashpublic File fetchGravatar(String hash) throws IOException
GravatarServiceThe files are cached for a certain time.
fetchGravatar in interface GravatarServicehash - Gravatar image hashIOException@Scheduled(fixedDelay=3600000L) public void cacheCleanup()
Copyright © 2011–2017. All rights reserved.