public class SourceResponse
extends java.lang.Object
Constructor and Description |
---|
SourceResponse(SourceConfiguration config,
int status,
SourceRequest request) |
SourceResponse(SourceConfiguration config,
int status,
java.lang.String statusLine,
SourceRequest request) |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(java.lang.String name,
java.lang.String value) |
void |
checkResponseChunkDisable(org.apache.axis2.context.MessageContext responseMsgContext) |
void |
connect(Pipe pipe) |
java.nio.ByteBuffer |
copyAndWrite(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.nio.ContentEncoder encoder)
Same as
write(org.apache.http.nio.NHttpServerConnection, org.apache.http.nio.ContentEncoder)
but gives out the data consumed through the Pipe |
java.lang.String |
getHeader(java.lang.String name) |
boolean |
hasEntity() |
void |
removeHeader(java.lang.String name) |
void |
setKeepAlive(boolean keepAlive) |
void |
setStatus(int status) |
void |
start(org.apache.http.nio.NHttpServerConnection conn)
Starts the response by writing the headers
|
int |
write(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.nio.ContentEncoder encoder)
Consume the content through the Pipe and write them to the wire
|
public SourceResponse(SourceConfiguration config, int status, SourceRequest request)
public SourceResponse(SourceConfiguration config, int status, java.lang.String statusLine, SourceRequest request)
public void connect(Pipe pipe)
public void start(org.apache.http.nio.NHttpServerConnection conn) throws java.io.IOException, org.apache.http.HttpException
conn
- connectionjava.io.IOException
- if an error occursorg.apache.http.HttpException
- if an error occurspublic void checkResponseChunkDisable(org.apache.axis2.context.MessageContext responseMsgContext) throws java.io.IOException
java.io.IOException
public int write(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.nio.ContentEncoder encoder) throws java.io.IOException
conn
- connectionencoder
- encoderjava.io.IOException
- if an error occurspublic java.nio.ByteBuffer copyAndWrite(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.nio.ContentEncoder encoder) throws java.io.IOException
write(org.apache.http.nio.NHttpServerConnection, org.apache.http.nio.ContentEncoder)
but gives out the data consumed through the Pipeconn
- connectionencoder
- encoderjava.io.IOException
- if an error occurspublic void addHeader(java.lang.String name, java.lang.String value)
public void setStatus(int status)
public void removeHeader(java.lang.String name)
public java.lang.String getHeader(java.lang.String name)
public boolean hasEntity()
public void setKeepAlive(boolean keepAlive)
Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.