Class HttpServerEncoder
java.lang.Object
org.apache.mina.http.HttpServerEncoder
- All Implemented Interfaces:
ProtocolEncoder
An encoder for the HTTP server
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final CharsetEncoderprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ENCODER
-
-
Constructor Details
-
HttpServerEncoder
public HttpServerEncoder()
-
-
Method Details
-
encode
Encodes higher-level message objects into binary or protocol-specific data. MINA invokesProtocolEncoder.encode(IoSession, Object, ProtocolEncoderOutput)method with message which is popped from the session write queue, and then the encoder implementation puts encoded messages (typicallyIoBuffers) intoProtocolEncoderOutput.- Specified by:
encodein interfaceProtocolEncoder- Parameters:
session- The current Sessionmessage- the message to encodeout- TheProtocolEncoderOutputthat will receive the encoded message- Throws:
Exception- if the message violated protocol specification
-
dispose
Releases all resources related with this encoder.- Specified by:
disposein interfaceProtocolEncoder- Parameters:
session- The current Session- Throws:
Exception- if failed to dispose all resources
-