Class AS2HttpResponseHandlerSocket

    • Constructor Detail

      • AS2HttpResponseHandlerSocket

        public AS2HttpResponseHandlerSocket​(@Nonnull
                                            Socket aSocket,
                                            boolean bQuoteHeaderValues)
    • Method Detail

      • getSocket

        @Nonnull
        public final Socket getSocket()
        Returns:
        The socket provided in the constructor. Never null.
      • isQuoteHeaderHeaderValues

        public final boolean isQuoteHeaderHeaderValues()
        Returns:
        true if HTTP header values should be quoted, false if not.
        Since:
        4.4.4
      • getHTTPVersion

        @Nonnull
        @OverrideOnDemand
        public com.helger.http.EHttpVersion getHTTPVersion()
        Returns:
        The HTTP version to use. May not be null.
      • sendHttpResponse

        public void sendHttpResponse​(@Nonnegative
                                     int nHttpResponseCode,
                                     @Nonnull
                                     com.helger.commons.http.HttpHeaderMap aHeaders,
                                     @Nonnull @WillNotClose
                                     com.helger.commons.io.IWriteToStream aData)
                              throws IOException
        Description copied from interface: IAS2HttpResponseHandler
        Added an HTTP header to the response. This method must be called before any output is written.
        Specified by:
        sendHttpResponse in interface IAS2HttpResponseHandler
        Parameters:
        nHttpResponseCode - 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.
        Throws:
        IOException - In case of error