org.apache.synapse.transport.passthru
Class TargetResponse
java.lang.Object
org.apache.synapse.transport.passthru.TargetResponse
public class TargetResponse
- extends Object
This class represents a response coming from the target server.
|
Constructor Summary |
TargetResponse(TargetConfiguration targetConfiguration,
org.apache.http.HttpResponse response,
org.apache.http.nio.NHttpClientConnection conn,
boolean expectResponseBody,
boolean forceShutdownConnectionOnComplete)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TargetResponse
public TargetResponse(TargetConfiguration targetConfiguration,
org.apache.http.HttpResponse response,
org.apache.http.nio.NHttpClientConnection conn,
boolean expectResponseBody,
boolean forceShutdownConnectionOnComplete)
start
public void start(org.apache.http.nio.NHttpClientConnection conn)
- Starts the response
- Parameters:
conn - the client connection
read
public int read(org.apache.http.nio.NHttpClientConnection conn,
org.apache.http.nio.ContentDecoder decoder)
throws IOException
- Read the data from the wire and read in to the pipe so that other end of
the pipe can write.
- Parameters:
conn - the target connectiondecoder - content decoder
- Returns:
- number of bites read
- Throws:
IOException - if an error occurs
getHeader
public String getHeader(String name)
getHeaders
public Map<String,String> getHeaders()
getExcessHeaders
public Map getExcessHeaders()
addExcessHeader
public void addExcessHeader(org.apache.http.Header h)
getPipe
public Pipe getPipe()
getStatus
public int getStatus()
getStatusLine
public String getStatusLine()
isExpectResponseBody
public boolean isExpectResponseBody()
getConnection
public org.apache.http.nio.NHttpClientConnection getConnection()
getVersion
public org.apache.http.ProtocolVersion getVersion()
Copyright © 2005–2015 Apache Software Foundation. All rights reserved.