Package jenkins.scm.impl.avatars
Class UrlAvatarCacheSource
- java.lang.Object
-
- jenkins.scm.impl.avatars.UrlAvatarCacheSource
-
- All Implemented Interfaces:
AvatarImageSource
public class UrlAvatarCacheSource extends Object implements AvatarImageSource
Basic URL based Cache Source - Fetches Image from HTTP/HTTPS URL without authentication
-
-
Constructor Summary
Constructors Constructor Description UrlAvatarCacheSource(String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canFetch()
CHeck if we can fetch.AvatarImage
fetch()
Fetch image and return along with lastModifiedString
getId()
Generate hash key used for caching
-
-
-
Constructor Detail
-
UrlAvatarCacheSource
public UrlAvatarCacheSource(String url)
-
-
Method Detail
-
canFetch
public boolean canFetch()
CHeck if we can fetch. Only HTTP/HTTPS urls are supported- Specified by:
canFetch
in interfaceAvatarImageSource
- Returns:
- true if can fetch
-
fetch
public AvatarImage fetch()
Fetch image and return along with lastModified- Specified by:
fetch
in interfaceAvatarImageSource
- Returns:
- image as AvatarImage object
-
getId
public String getId()
Generate hash key used for caching- Specified by:
getId
in interfaceAvatarImageSource
-
-