Class ObjectUploadListener

java.lang.Object
org.eclipse.jgit.lfs.server.fs.ObjectUploadListener
All Implemented Interfaces:
EventListener, javax.servlet.ReadListener

public class ObjectUploadListener extends Object implements javax.servlet.ReadListener
Handle asynchronous object upload.
Since:
4.6
  • Field Details

  • Constructor Details

    • ObjectUploadListener

      public ObjectUploadListener(FileLfsRepository repository, javax.servlet.AsyncContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AnyLongObjectId id) throws FileNotFoundException, IOException
      Constructor for ObjectUploadListener.
      Parameters:
      repository - the repository storing large objects
      context - a AsyncContext object.
      request - a HttpServletRequest object.
      response - a HttpServletResponse object.
      id - a AnyLongObjectId object.
      Throws:
      FileNotFoundException
      IOException
  • Method Details

    • setCallback

      public ObjectUploadListener setCallback(ObjectUploadListener.Callback callback)
      Set the callback to invoke after upload completed.
      Parameters:
      callback - the callback
      Returns:
      this.
      Since:
      5.1.7
    • onDataAvailable

      public void onDataAvailable() throws IOException
      Writes all the received data to the output channel
      Specified by:
      onDataAvailable in interface javax.servlet.ReadListener
      Throws:
      IOException
    • onAllDataRead

      public void onAllDataRead() throws IOException
      Specified by:
      onAllDataRead in interface javax.servlet.ReadListener
      Throws:
      IOException
    • close

      protected void close() throws IOException
      Close resources held by this listener
      Throws:
      IOException
    • onError

      public void onError(Throwable e)
      Specified by:
      onError in interface javax.servlet.ReadListener