Class HttpResponseEncoder.Result.Factory
java.lang.Object
org.jdrupes.httpcodec.Codec.Result.Factory
org.jdrupes.httpcodec.protocols.http.HttpEncoder.Result.Factory
org.jdrupes.httpcodec.protocols.http.server.HttpResponseEncoder.Result.Factory
- Enclosing class:
- HttpResponseEncoder.Result
A factory for creating new Results.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnewResult
(boolean overflow, boolean underflow, boolean closeConnection) Create a new (preliminary) result.newResult
(boolean overflow, boolean underflow, boolean closeConnection, String newProtocol, Decoder<?, ?> newDecoder, Encoder<?, ?> newEncoder) Create a new result.
-
Constructor Details
-
Factory
protected Factory()
-
-
Method Details
-
newResult
public HttpResponseEncoder.Result newResult(boolean overflow, boolean underflow, boolean closeConnection, String newProtocol, Decoder<?, ?> newDecoder, Encoder<?, ?> newEncoder) Create a new result.- Parameters:
overflow
- true if the data didn’t fit in the out bufferunderflow
- true if more data is expectedcloseConnection
- true if the connection should be closednewProtocol
- the name of the new protocol if a switch occurrednewDecoder
- the new decoder if a switch occurrednewEncoder
- the new decoder if a switch occurred- Returns:
- the result
-
newResult
public HttpResponseEncoder.Result newResult(boolean overflow, boolean underflow, boolean closeConnection) Create a new (preliminary) result.This is invoked by the base class. We cannot supply the missing information yet. If necessary the result will be modified in
HttpResponseEncoder.encode(Buffer, ByteBuffer, boolean)
.- Overrides:
newResult
in classHttpEncoder.Result.Factory
- Parameters:
overflow
- true if the data didn’t fit in the out bufferunderflow
- true if more data is expectedcloseConnection
- true if the connection should be closed- Returns:
- the result
-