|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.impl.nio.codecs.AbstractMessageWriter<T>
@NotThreadSafe public abstract class AbstractMessageWriter<T extends HttpMessage>
Abstract NHttpMessageWriter that serves as a base for all message
writer implementations.
| Field Summary | |
|---|---|
protected CharArrayBuffer |
lineBuf
|
protected LineFormatter |
lineFormatter
|
protected SessionOutputBuffer |
sessionBuffer
|
| Constructor Summary | |
|---|---|
AbstractMessageWriter(SessionOutputBuffer buffer,
LineFormatter formatter,
HttpParams params)
Creates an instance of this class. |
|
| Method Summary | |
|---|---|
void |
reset()
Resets the writer. |
void |
write(T message)
Serializes out the HTTP message head. |
protected abstract void |
writeHeadLine(T message)
Writes out the first line of HttpMessage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final SessionOutputBuffer sessionBuffer
protected final CharArrayBuffer lineBuf
protected final LineFormatter lineFormatter
| Constructor Detail |
|---|
public AbstractMessageWriter(SessionOutputBuffer buffer,
LineFormatter formatter,
HttpParams params)
buffer - the session output buffer.formatter - the line formatter.params - HTTP parameters.| Method Detail |
|---|
public void reset()
NHttpMessageWriter
reset in interface NHttpMessageWriter<T extends HttpMessage>
protected abstract void writeHeadLine(T message)
throws IOException
HttpMessage.
message - HTTP message.
HttpException - in case of HTTP protocol violation
IOException
public void write(T message)
throws IOException,
HttpException
NHttpMessageWriter
write in interface NHttpMessageWriter<T extends HttpMessage>message - HTTP message.
IOException - in case of an I/O error.
HttpException - in case the HTTP message is malformed or
violates the HTTP protocol.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||