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.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, urlFields inherited from class org.apache.cxf.io.AbstractThresholdOutputStream
buffer, thresholdFields inherited from class org.apache.cxf.io.AbstractWrappedOutputStream
allowFlush, wrappedStream, written -
Constructor Summary
ConstructorsConstructorDescriptionAsyncWrappedOutputStream(Message message, boolean needToCacheRequest, boolean isChunking, int chunkThreshold, String conduitName, URI uri) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanThis method performs a retransmit for authorization information.voidclose()Perform any actions required on stream closure (handle response etc.)protected voidprotected voidconnect(boolean output) intcopyFrom(InputStream in) protected org.apache.http.HttpResponseprotected HttpsURLConnectionInfoprotected InputStreamprotected InputStreamprotected intprotected Stringprotected voidprotected voidprotected voidbooleanisOpen()protected voidPerform any actions required on stream flush (freeze headers, reset output stream ...booleanprotected voidprotected booleanretrySetHttpResponse(org.apache.http.HttpResponse r) protected voidprotected voidsetFixedLengthStreamingMode(int i) protected voidsetHttpResponse(org.apache.http.HttpResponse r) protected voidvoidsetSSLSession(SSLSession sslsession) protected voidsetupNewConnection(String newURL) protected voidvoidprotected voidprotected voidupdateResponseHeaders(Message inMessage) protected booleanintwrite(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, thresholdNotReachedMethods inherited from class org.apache.cxf.io.AbstractThresholdOutputStream
unBuffer, write, writeMethods inherited from class org.apache.cxf.io.AbstractWrappedOutputStream
allowFlush, flush, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
AsyncWrappedOutputStream
-
-
Method Details
-
retransmitable
public boolean retransmitable() -
getCachedStream
-
setProtocolHeaders
- Specified by:
setProtocolHeadersin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
setFixedLengthStreamingMode
protected void setFixedLengthStreamingMode(int i) - Specified by:
setFixedLengthStreamingModein classHTTPConduit.WrappedOutputStream
-
thresholdReached
- Specified by:
thresholdReachedin classAbstractThresholdOutputStream- Throws:
IOException
-
handleNoOutput
- Overrides:
handleNoOutputin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
isOpen
public boolean isOpen() -
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
copyFrom
- Specified by:
copyFromin interfaceCopyingOutputStream- Throws:
IOException
-
close
Description 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
Description copied from class:HTTPConduit.WrappedOutputStreamPerform any actions required on stream flush (freeze headers, reset output stream ... etc.)- Overrides:
onFirstWritein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
setupWrappedStream
- Specified by:
setupWrappedStreamin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
connect
- Throws:
IOException
-
retrySetHttpResponse
protected boolean retrySetHttpResponse(org.apache.http.HttpResponse r) -
setHttpResponse
protected void setHttpResponse(org.apache.http.HttpResponse r) -
setException
-
handleCancelled
protected void handleCancelled() -
getHttpResponse
- Throws:
IOException
-
handleResponseAsync
- Specified by:
handleResponseAsyncin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
closeInputStream
- Specified by:
closeInputStreamin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
getInputStream
- Specified by:
getInputStreamin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
usingProxy
protected boolean usingProxy()- Specified by:
usingProxyin classHTTPConduit.WrappedOutputStream
-
getHttpsURLConnectionInfo
- Specified by:
getHttpsURLConnectionInfoin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
getResponseCode
- Specified by:
getResponseCodein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
getResponseMessage
- Specified by:
getResponseMessagein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
updateResponseHeaders
- Specified by:
updateResponseHeadersin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
getPartialResponse
- Specified by:
getPartialResponsein classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
updateCookiesBeforeRetransmit
- Specified by:
updateCookiesBeforeRetransmitin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
authorizationRetransmit
Description 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
- Specified by:
retransmitStreamin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
setupNewConnection
- Specified by:
setupNewConnectionin classHTTPConduit.WrappedOutputStream- Throws:
IOException
-
setSSLSession
-