Example usage for org.eclipse.jgit.lfs.server.fs ObjectDownloadListener ObjectDownloadListener

List of usage examples for org.eclipse.jgit.lfs.server.fs ObjectDownloadListener ObjectDownloadListener

Introduction

In this page you can find the example usage for org.eclipse.jgit.lfs.server.fs ObjectDownloadListener ObjectDownloadListener.

Prototype

public ObjectDownloadListener(FileLfsRepository repository, AsyncContext context, HttpServletResponse response,
        AnyLongObjectId id) throws IOException 

Source Link

Document

Constructor for ObjectDownloadListener.

Usage

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()));
    }
}