List of usage examples for org.eclipse.jgit.lfs.server.fs ObjectDownloadListener ObjectDownloadListener
public ObjectDownloadListener(FileLfsRepository repository, AsyncContext context, HttpServletResponse response, AnyLongObjectId id) throws IOException
Constructor for ObjectDownloadListener.
From source file:com.googlesource.gerrit.plugins.lfs.fs.LfsFsContentServlet.java
License:Apache License
private void getObject(HttpServletRequest req, HttpServletResponse rsp, Optional<AnyLongObjectId> obj) throws IOException { if (obj.isPresent()) { AsyncContext context = req.startAsync(); context.setTimeout(timeout);/* w w w. ja va2s. c o m*/ rsp.getOutputStream().setWriteListener(new ObjectDownloadListener(repository, context, rsp, obj.get())); } }