protected abstract class HTTPConduit.WrappedOutputStream extends AbstractThresholdOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected CacheAndWriteOutputStream |
cachedStream
This field contains the output stream with which we cache
the request.
|
protected boolean |
cachingForRetransmission
This boolean is true if the request must be cached.
|
protected boolean |
chunking
If we are going to be chunking, we won't flush till close which causes
new chunks, small network packets, etc..
|
protected String |
conduitName |
protected Message |
outMessage |
protected URI |
url |
buffer, thresholdallowFlush, wrappedStream, written| Modifier | Constructor and Description |
|---|---|
protected |
HTTPConduit.WrappedOutputStream(HTTPConduit.WrappedOutputStream wos) |
protected |
HTTPConduit.WrappedOutputStream(Message outMessage,
boolean possibleRetransmit,
boolean isChunking,
int chunkThreshold,
String conduitName,
URI url) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
authorizationRetransmit()
This method performs a retransmit for authorization information.
|
void |
close()
Perform any actions required on stream closure (handle response etc.)
|
protected abstract void |
closeInputStream() |
protected abstract HttpsURLConnectionInfo |
getHttpsURLConnectionInfo() |
protected abstract InputStream |
getInputStream() |
protected String |
getMethod() |
protected abstract InputStream |
getPartialResponse() |
protected abstract int |
getResponseCode() |
protected abstract String |
getResponseMessage() |
protected void |
handleHeadersTrustCaching() |
protected void |
handleHttpRetryException(HttpRetryException e) |
protected void |
handleNoOutput() |
protected void |
handleResponse()
This procedure is called on the close of the output stream so
we are ready to handle the response from the connection.
|
protected abstract void |
handleResponseAsync() |
protected void |
handleResponseInternal() |
protected void |
handleResponseOnWorkqueue(boolean allowCurrentThread,
boolean forceWQ) |
protected void |
handleRetransmits()
This procedure handles all retransmits, if any.
|
protected void |
makeTrustDecision()
This call must take place before anything is written to the
URLConnection.
|
protected void |
onFirstWrite()
Perform any actions required on stream flush (freeze headers,
reset output stream ...
|
protected boolean |
processRetransmit()
This function processes any retransmits at the direction of redirections
or "unauthorized" responses.
|
protected void |
propagateConduit(Exchange exchange,
Message in) |
protected boolean |
redirectRetransmit() |
protected void |
retransmit(String newURL) |
protected abstract void |
retransmitStream() |
protected abstract void |
setFixedLengthStreamingMode(int i) |
protected abstract void |
setProtocolHeaders() |
protected abstract void |
setupNewConnection(String newURL) |
protected abstract void |
setupWrappedStream() |
void |
thresholdNotReached() |
protected abstract void |
updateCookiesBeforeRetransmit() |
protected abstract void |
updateResponseHeaders(Message inMessage) |
protected abstract boolean |
usingProxy() |
thresholdReached, unBuffer, write, writeallowFlush, flush, writeprotected boolean cachingForRetransmission
protected final boolean chunking
protected CacheAndWriteOutputStream cachedStream
protected Message outMessage
protected String conduitName
protected URI url
protected HTTPConduit.WrappedOutputStream(Message outMessage, boolean possibleRetransmit, boolean isChunking, int chunkThreshold, String conduitName, URI url)
protected HTTPConduit.WrappedOutputStream(HTTPConduit.WrappedOutputStream wos)
public void thresholdNotReached()
thresholdNotReached in class AbstractThresholdOutputStreamprotected abstract void setupWrappedStream()
throws IOException
IOExceptionprotected abstract HttpsURLConnectionInfo getHttpsURLConnectionInfo() throws IOException
IOExceptionprotected abstract void setProtocolHeaders()
throws IOException
IOExceptionprotected abstract void setFixedLengthStreamingMode(int i)
protected abstract int getResponseCode()
throws IOException
IOExceptionprotected abstract String getResponseMessage() throws IOException
IOExceptionprotected abstract void updateResponseHeaders(Message inMessage) throws IOException
IOExceptionprotected abstract void handleResponseAsync()
throws IOException
IOExceptionprotected abstract void closeInputStream()
throws IOException
IOExceptionprotected abstract boolean usingProxy()
protected abstract InputStream getInputStream() throws IOException
IOExceptionprotected abstract InputStream getPartialResponse() throws IOException
IOExceptionprotected abstract void setupNewConnection(String newURL) throws IOException
IOExceptionprotected abstract void retransmitStream()
throws IOException
IOExceptionprotected abstract void updateCookiesBeforeRetransmit()
throws IOException
IOExceptionprotected void handleNoOutput()
throws IOException
IOExceptionprotected void handleResponseOnWorkqueue(boolean allowCurrentThread,
boolean forceWQ)
throws IOException
IOExceptionprotected void retransmit(String newURL) throws IOException
IOExceptionprotected void onFirstWrite()
throws IOException
onFirstWrite in class AbstractWrappedOutputStreamIOExceptionprotected String getMethod()
protected void handleHeadersTrustCaching()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class AbstractThresholdOutputStreamIOExceptionprotected void handleRetransmits()
throws IOException
IOExceptionprotected boolean processRetransmit()
throws IOException
IOExceptionprotected boolean redirectRetransmit()
throws IOException
IOExceptionprotected boolean authorizationRetransmit()
throws IOException
connection - The currently active connection.message - The outbound message.cachedStream - The cached request.IOExceptionprotected void handleResponse()
throws IOException
IOExceptionprotected void handleResponseInternal()
throws IOException
IOExceptionprotected void handleHttpRetryException(HttpRetryException e) throws IOException
IOExceptionprotected void makeTrustDecision()
throws IOException
message - The message being sent.IOException - This exception is thrown if trust cannot be
established by the configured MessageTrustDecider.MessageTrustDeciderApache CXF