public class AS2HttpResponseHandlerSocket extends Object implements IAS2HttpResponseHandler
IAS2HttpResponseHandler that writes an HTTP 1.1
response directly to a Socket.| Constructor and Description |
|---|
AS2HttpResponseHandlerSocket(Socket aSocket,
boolean bQuoteHeaderValues) |
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
createOutputStream() |
com.helger.http.EHttpVersion |
getHTTPVersion() |
Socket |
getSocket() |
boolean |
isQuoteHeaderHeaderValues() |
void |
sendHttpResponse(int nHttpResponseCode,
com.helger.commons.http.HttpHeaderMap aHeaders,
com.helger.commons.io.IWriteToStream aData)
Added an HTTP header to the response.
|
@Nonnull public final Socket getSocket()
null.public final boolean isQuoteHeaderHeaderValues()
true if HTTP header values should be quoted,
false if not.@Nonnull @OverrideOnDemand public com.helger.http.EHttpVersion getHTTPVersion()
null.@Nonnull @OverrideOnDemand public OutputStream createOutputStream() throws IOException
IOExceptionpublic void sendHttpResponse(@Nonnegative int nHttpResponseCode, @Nonnull com.helger.commons.http.HttpHeaderMap aHeaders, @Nonnull @WillNotClose com.helger.commons.io.IWriteToStream aData) throws IOException
IAS2HttpResponseHandlersendHttpResponse in interface IAS2HttpResponseHandlernHttpResponseCode - The HTTP response code. E.g. 200 for "HTTP OK". Must be > 0.aHeaders - Headers to use. May not be null.aData - Data to send as response body. May not be null but may
be empty.IOException - In case of errorCopyright © 2013–2022 Philip Helger. All rights reserved.