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) |
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
createOutputStream() |
com.helger.http.EHttpVersion |
getHTTPVersion() |
Socket |
getSocket() |
void |
sendHttpResponse(int nHttpResponseCode,
com.helger.commons.http.HttpHeaderMap aHeaders,
com.helger.commons.io.IWriteToStream aData)
Added an HTTP header to the response.
|
@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 errorpublic Socket getSocket()
Copyright © 2013–2019 Philip Helger. All rights reserved.