Package org.apache.mina.http
Class HttpServerEncoder
- java.lang.Object
-
- org.apache.mina.http.HttpServerEncoder
-
- All Implemented Interfaces:
ProtocolEncoder
public class HttpServerEncoder extends java.lang.Object implements ProtocolEncoder
An encoder for the HTTP server
-
-
Constructor Summary
Constructors Constructor Description HttpServerEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose(IoSession session)Releases all resources related with this encoder.voidencode(IoSession session, java.lang.Object message, ProtocolEncoderOutput out)Encodes higher-level message objects into binary or protocol-specific data.
-
-
-
Method Detail
-
encode
public void encode(IoSession session, java.lang.Object message, ProtocolEncoderOutput out) throws java.lang.Exception
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:
java.lang.Exception- if the message violated protocol specification
-
dispose
public void dispose(IoSession session) throws java.lang.Exception
Releases all resources related with this encoder.- Specified by:
disposein interfaceProtocolEncoder- Parameters:
session- The current Session- Throws:
java.lang.Exception- if failed to dispose all resources
-
-