org.apache.mina.examples.reverser
Class TextLineEncoder
java.lang.Object
org.apache.mina.examples.reverser.TextLineEncoder
- All Implemented Interfaces:
- ProtocolEncoder
public class TextLineEncoder
- extends Object
- implements ProtocolEncoder
Encodes a string into a text line which ends with "\r\n"
.
- Version:
- $Rev: 264677 $, $Date: 2005-08-30 11:44:35 +0900 $,
- Author:
- Trustin Lee (trustin@apache.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextLineEncoder
public TextLineEncoder()
encode
public void encode(ProtocolSession session,
Object message,
ProtocolEncoderOutput out)
throws ProtocolViolationException
- Description copied from interface:
ProtocolEncoder
- Encodes higher-level message objects into binary or protocol-specific data.
MINA invokes
ProtocolEncoder.encode(ProtocolSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded ByteBuffer
s into
ProtocolEncoderOutput
.
- Specified by:
encode
in interface ProtocolEncoder
- Throws:
ProtocolViolationException
- if the message violated protocol
specification
Copyright © 2004-2005 . All Rights Reserved.