org.apache.mina.filter.codec
Class SynchronizedProtocolEncoder
java.lang.Object
org.apache.mina.filter.codec.SynchronizedProtocolEncoder
- ProtocolEncoder
public class SynchronizedProtocolEncoder
extends java.lang.Object
A
ProtocolEncoder
implementation which decorates an existing encoder
to be thread-safe. Please be careful if you're going to use this decorator
because it can be a root of performance degradation in a multi-thread
environment. Please use this decorator only when you need to synchronize
on a per-encoder basis instead of on a per-session basis, which is not
common.
SynchronizedProtocolEncoder
public SynchronizedProtocolEncoder(ProtocolEncoder encoder)
Creates a new instance which decorates the specified encoder.
getEncoder
public ProtocolEncoder getEncoder()
Returns the encoder this encoder is decorating.