Class ObjectUploadListener

  • All Implemented Interfaces:
    EventListener, javax.servlet.ReadListener

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

      • 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 Detail

      • 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
      • onError

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