Package net.i2p.imagegen
Class IdenticonServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.i2p.imagegen.IdenticonServlet
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
public class IdenticonServlet extends HttpServlet
This servlet generates identicon (visual identifier) images ranging
from 16x16 to 512x512 in size.
Supported Image Formats
Currently only PNG is supported because javax.imageio
package
does not come with built-in GIF encoder and PNG is the only remaining
reasonable format.
Initialization Parameters:
- inetSalt
- salt used to generate identicon code with. must be fairly long. (Required)
- cacheProvider
- full class path to
IdenticonCache
implementation. (Optional)
Request ParametersP
- code
- identicon code to render. If missing, requester's IP addresses is used to generated one. (Optional)
- size
- identicon size in pixels. If missing, a 16x16 pixels identicon is returned. Minimum size is 16 and maximum is 64. (Optional)
- Since:
- 0.9.25
- Author:
- don
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description IdenticonServlet()
-
Method Summary
Modifier and Type Method Description protected void
doGet(HttpServletRequest request, HttpServletResponse response)
void
init(ServletConfig cfg)
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
IdenticonServlet
public IdenticonServlet()
-
-
Method Details
-
init
- Specified by:
init
in interfaceServlet
- Overrides:
init
in classGenericServlet
- Throws:
ServletException
-
doGet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException- Overrides:
doGet
in classHttpServlet
- Throws:
ServletException
IOException
-