|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.entity.AbstractHttpEntity
org.limewire.http.entity.AbstractProducingNHttpEntity
public abstract class AbstractProducingNHttpEntity
Abstract implementation of ProducingNHttpEntity that adds support for
timing out the transfer if it takes too long.
| Field Summary |
|---|
| Fields inherited from class org.apache.http.entity.AbstractHttpEntity |
|---|
chunked, contentEncoding, contentType |
| Constructor Summary | |
|---|---|
AbstractProducingNHttpEntity()
|
|
| Method Summary | |
|---|---|
protected void |
activateTimeout()
|
protected void |
deactivateTimeout()
|
InputStream |
getContent()
Throws UnsupportedOperationException. |
abstract long |
getContentLength()
|
abstract void |
initialize(org.apache.http.nio.ContentEncoder contentEncoder,
org.apache.http.nio.IOControl ioctrl)
Invoked before the first call to writeContent(ContentEncoder, IOControl). |
boolean |
isRepeatable()
Throws UnsupportedOperationException. |
boolean |
isStreaming()
Throws UnsupportedOperationException. |
void |
produceContent(org.apache.http.nio.ContentEncoder encoder,
org.apache.http.nio.IOControl ioctrl)
|
abstract void |
timeout()
Invoked when the transfer times out. |
abstract boolean |
writeContent(org.apache.http.nio.ContentEncoder contentEncoder,
org.apache.http.nio.IOControl ioctrl)
Sub-classes need to implement this and and write data to the ContentEncoder. |
void |
writeTo(OutputStream outstream)
Throws UnsupportedOperationException. |
| Methods inherited from class org.apache.http.entity.AbstractHttpEntity |
|---|
consumeContent, getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.http.nio.entity.ProducingNHttpEntity |
|---|
finish |
| Methods inherited from interface org.apache.http.HttpEntity |
|---|
consumeContent, getContentEncoding, getContentType, isChunked |
| Constructor Detail |
|---|
public AbstractProducingNHttpEntity()
| Method Detail |
|---|
protected void activateTimeout()
protected void deactivateTimeout()
public InputStream getContent()
throws IOException,
IllegalStateException
UnsupportedOperationException.
getContent in interface org.apache.http.HttpEntityIOException
IllegalStateExceptionpublic abstract long getContentLength()
getContentLength in interface org.apache.http.HttpEntitypublic boolean isRepeatable()
UnsupportedOperationException.
isRepeatable in interface org.apache.http.HttpEntitypublic boolean isStreaming()
UnsupportedOperationException.
isStreaming in interface org.apache.http.HttpEntity
public void writeTo(OutputStream outstream)
throws IOException
UnsupportedOperationException.
writeTo in interface org.apache.http.HttpEntityIOException
public final void produceContent(org.apache.http.nio.ContentEncoder encoder,
org.apache.http.nio.IOControl ioctrl)
throws IOException
produceContent in interface org.apache.http.nio.entity.ProducingNHttpEntityIOException
public abstract boolean writeContent(org.apache.http.nio.ContentEncoder contentEncoder,
org.apache.http.nio.IOControl ioctrl)
throws IOException
IOException - indicates an I/O error which will abort the
connection
public abstract void initialize(org.apache.http.nio.ContentEncoder contentEncoder,
org.apache.http.nio.IOControl ioctrl)
throws IOException
writeContent(ContentEncoder, IOControl).
IOException - indicates an I/O error which will abort the
connectionpublic abstract void timeout()
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||