public class ObjectUploadListener
extends java.lang.Object
implements javax.servlet.ReadListener
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
buffer |
private java.nio.channels.WritableByteChannel |
channel |
private javax.servlet.AsyncContext |
context |
private javax.servlet.ServletInputStream |
in |
private java.nio.channels.ReadableByteChannel |
inChannel |
private static java.util.logging.Logger |
LOG |
private AtomicObjectOutputStream |
out |
private javax.servlet.http.HttpServletResponse |
response |
Constructor and Description |
---|
ObjectUploadListener(FileLfsRepository repository,
javax.servlet.AsyncContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AnyLongObjectId id)
Constructor for ObjectUploadListener.
|
Modifier and Type | Method and Description |
---|---|
protected void |
close()
Close resources held by this listener
|
void |
onAllDataRead() |
void |
onDataAvailable()
Writes all the received data to the output channel
|
void |
onError(java.lang.Throwable e) |
private static java.util.logging.Logger LOG
private final javax.servlet.AsyncContext context
private final javax.servlet.http.HttpServletResponse response
private final javax.servlet.ServletInputStream in
private final java.nio.channels.ReadableByteChannel inChannel
private final AtomicObjectOutputStream out
private java.nio.channels.WritableByteChannel channel
private final java.nio.ByteBuffer buffer
public ObjectUploadListener(FileLfsRepository repository, javax.servlet.AsyncContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AnyLongObjectId id) throws java.io.FileNotFoundException, java.io.IOException
repository
- the repository storing large objectscontext
- a AsyncContext
object.request
- a HttpServletRequest
object.response
- a HttpServletResponse
object.id
- a AnyLongObjectId
object.java.io.FileNotFoundException
java.io.IOException
public void onDataAvailable() throws java.io.IOException
onDataAvailable
in interface javax.servlet.ReadListener
java.io.IOException
public void onAllDataRead() throws java.io.IOException
onAllDataRead
in interface javax.servlet.ReadListener
java.io.IOException
protected void close() throws java.io.IOException
java.io.IOException
public void onError(java.lang.Throwable e)
onError
in interface javax.servlet.ReadListener