Class AsyncHTTPConduit.AsyncWrappedOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.cxf.io.AbstractWrappedOutputStream
-
- org.apache.cxf.io.AbstractThresholdOutputStream
-
- org.apache.cxf.transport.http.HTTPConduit.WrappedOutputStream
-
- org.apache.cxf.transport.http.asyncclient.hc5.AsyncHTTPConduit.AsyncWrappedOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,Channel,WritableByteChannel,CopyingOutputStream
- Enclosing class:
- AsyncHTTPConduit
public class AsyncHTTPConduit.AsyncWrappedOutputStream extends HTTPConduit.WrappedOutputStream implements CopyingOutputStream, WritableByteChannel
-
-
Field Summary
-
Fields inherited from class org.apache.cxf.transport.http.HTTPConduit.WrappedOutputStream
cachedStream, cachingForRetransmission, chunking, conduitName, outMessage, url
-
Fields inherited from class org.apache.cxf.io.AbstractThresholdOutputStream
buffer, threshold
-
Fields inherited from class org.apache.cxf.io.AbstractWrappedOutputStream
allowFlush, wrappedStream, written
-
-
Constructor Summary
Constructors Constructor Description AsyncWrappedOutputStream(Message message, boolean needToCacheRequest, boolean isChunking, int chunkThreshold, String conduitName, URI uri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanauthorizationRetransmit()This method performs a retransmit for authorization information.voidclose()Perform any actions required on stream closure (handle response etc.)protected voidcloseInputStream()protected voidconnect(boolean output)intcopyFrom(InputStream in)CachedOutputStreamgetCachedStream()protected org.apache.hc.core5.http.HttpResponsegetHttpResponse()protected HttpsURLConnectionInfogetHttpsURLConnectionInfo()protected InputStreamgetInputStream()protected InputStreamgetPartialResponse()protected intgetResponseCode()protected StringgetResponseMessage()protected voidhandleCancelled()protected voidhandleNoOutput()protected voidhandleResponseAsync()booleanisOpen()protected voidonFirstWrite()Perform any actions required on stream flush (freeze headers, reset output stream ...booleanretransmitable()protected voidretransmitStream()protected booleanretrySetHttpResponse(org.apache.hc.core5.http.HttpResponse r)protected voidsetException(Exception ex)protected voidsetFixedLengthStreamingMode(int i)protected voidsetHttpResponse(org.apache.hc.core5.http.HttpResponse r)protected voidsetProtocolHeaders()voidsetSSLSession(SSLSession sslsession)protected voidsetupNewConnection(String newURL)protected voidsetupWrappedStream()voidthresholdReached()protected voidupdateCookiesBeforeRetransmit()protected voidupdateResponseHeaders(Message inMessage)protected booleanusingProxy()intwrite(ByteBuffer src)-
Methods inherited from class org.apache.cxf.transport.http.HTTPConduit.WrappedOutputStream
doProcessResponseCode, getExceptionMessage, getMethod, handleHeadersTrustCaching, handleHttpRetryException, handleResponse, handleResponseInternal, handleResponseOnWorkqueue, handleRetransmits, makeTrustDecision, processRetransmit, propagateConduit, redirectRetransmit, retransmit, thresholdNotReached
-
Methods inherited from class org.apache.cxf.io.AbstractThresholdOutputStream
unBuffer, write, write
-
Methods inherited from class org.apache.cxf.io.AbstractWrappedOutputStream
allowFlush, flush, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Method Detail
-
retransmitable
public boolean retransmitable()
-
getCachedStream
public CachedOutputStream getCachedStream()
-
setProtocolHeaders
protected void setProtocolHeaders() throws IOException- Specified by:
setProtocolHeadersin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
setFixedLengthStreamingMode
protected void setFixedLengthStreamingMode(int i)
- Specified by:
setFixedLengthStreamingModein classHTTPConduit.WrappedOutputStream
-
thresholdReached
public void thresholdReached() throws IOException- Specified by:
thresholdReachedin classAbstractThresholdOutputStream- Throws:
IOException
-
handleNoOutput
protected void handleNoOutput() throws IOException- Overrides:
handleNoOutputin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
copyFrom
public int copyFrom(InputStream in) throws IOException
- Specified by:
copyFromin interfaceCopyingOutputStream- Throws:
IOException
-
close
public void close() throws IOExceptionDescription copied from class:HTTPConduit.WrappedOutputStreamPerform any actions required on stream closure (handle response etc.)- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Overrides:
closein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
onFirstWrite
protected void onFirstWrite() throws IOExceptionDescription copied from class:HTTPConduit.WrappedOutputStreamPerform any actions required on stream flush (freeze headers, reset output stream ... etc.)- Overrides:
onFirstWritein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
setupWrappedStream
protected void setupWrappedStream() throws IOException- Specified by:
setupWrappedStreamin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
connect
protected void connect(boolean output) throws IOException- Throws:
IOException
-
retrySetHttpResponse
protected boolean retrySetHttpResponse(org.apache.hc.core5.http.HttpResponse r)
-
setHttpResponse
protected void setHttpResponse(org.apache.hc.core5.http.HttpResponse r)
-
setException
protected void setException(Exception ex)
-
handleCancelled
protected void handleCancelled()
-
getHttpResponse
protected org.apache.hc.core5.http.HttpResponse getHttpResponse() throws IOException- Throws:
IOException
-
handleResponseAsync
protected void handleResponseAsync() throws IOException- Specified by:
handleResponseAsyncin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
closeInputStream
protected void closeInputStream() throws IOException- Specified by:
closeInputStreamin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
getInputStream
protected InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
usingProxy
protected boolean usingProxy()
- Specified by:
usingProxyin classHTTPConduit.WrappedOutputStream
-
getHttpsURLConnectionInfo
protected HttpsURLConnectionInfo getHttpsURLConnectionInfo() throws IOException
- Specified by:
getHttpsURLConnectionInfoin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
getResponseCode
protected int getResponseCode() throws IOException- Specified by:
getResponseCodein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
getResponseMessage
protected String getResponseMessage() throws IOException
- Specified by:
getResponseMessagein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
updateResponseHeaders
protected void updateResponseHeaders(Message inMessage) throws IOException
- Specified by:
updateResponseHeadersin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
getPartialResponse
protected InputStream getPartialResponse() throws IOException
- Specified by:
getPartialResponsein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
updateCookiesBeforeRetransmit
protected void updateCookiesBeforeRetransmit() throws IOException- Specified by:
updateCookiesBeforeRetransmitin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
authorizationRetransmit
protected boolean authorizationRetransmit() throws IOExceptionDescription copied from class:HTTPConduit.WrappedOutputStreamThis method performs a retransmit for authorization information.- Overrides:
authorizationRetransmitin classHTTPConduit.WrappedOutputStream- Returns:
- true if there was a retransmit
- Throws:
IOException
-
retransmitStream
protected void retransmitStream() throws IOException- Specified by:
retransmitStreamin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
setupNewConnection
protected void setupNewConnection(String newURL) throws IOException
- Specified by:
setupNewConnectionin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
setSSLSession
public void setSSLSession(SSLSession sslsession)
-
-