Java 类org.apache.mina.filter.codec.ProtocolDecoder 实例源码

项目:Camel    文件:Mina2VMCustomCodecTest.java   
@Override
public ProtocolDecoder getDecoder(IoSession is) throws Exception {
    return new CumulativeProtocolDecoder() {

        protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception {
            if (in.remaining() > 0) {
                byte[] buf = new byte[in.remaining()];
                in.get(buf);
                out.write(new String(buf, "US-ASCII"));
                return true;
            } else {
                return false;
            }
        }
    };
}
项目:Camel    文件:MinaVMCustomCodecTest.java   
public ProtocolDecoder getDecoder() throws Exception {
    return new CumulativeProtocolDecoder() {
        protected boolean doDecode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception {
            if (in.remaining() > 0) {
                byte[] buf = new byte[in.remaining()];
                in.get(buf);
                out.write(new String(buf, "US-ASCII"));
                return true;
            } else {
                return false;
            }
        }
    };
}
项目:Camel    文件:MinaCustomCodecTest.java   
public ProtocolDecoder getDecoder() throws Exception {
    return new CumulativeProtocolDecoder() {
        protected boolean doDecode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception {
            if (in.remaining() > 0) {
                byte[] buf = new byte[in.remaining()];
                in.get(buf);
                out.write(new String(buf, "US-ASCII"));
                return true;
            } else {
                return false;
            }
        }
    };
}
项目:sdrtrunk    文件:UltravoxProtocolFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession ioSession) throws Exception
{
    if(mDecoder == null)
    {
        mDecoder = new UltravoxDecoder();
    }

    return mDecoder;
}
项目:ugcs-java-sdk    文件:MinaCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    MinaDecoder minaDecoder = null;
    Object value = session.getAttribute(DECODER_ATTRIBUTE);
    if (value != null && value instanceof MinaDecoder)
        minaDecoder = (MinaDecoder) value;
    if (minaDecoder == null) {
        minaDecoder = new MinaDecoder(codecFactory.getDecoder());
        session.setAttribute(DECODER_ATTRIBUTE, minaDecoder);
    }
    return minaDecoder;
}
项目:jforgame    文件:MessageCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession arg0) throws Exception {
    return decoder;
}
项目:io-comparison    文件:MsgCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return msgDecoder;
}
项目:EatDubbo    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:neoscada    文件:ObjectSerializationCodecFactory.java   
public ProtocolDecoder getDecoder(IoSession session) {
    return decoder;
}
项目:neoscada    文件:DemuxingProtocolCodecFactory.java   
/**
 * {@inheritDoc}
 */
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:neoscada    文件:TextLineCodecFactory.java   
public ProtocolDecoder getDecoder(IoSession session) {
    return decoder;
}
项目:neoscada    文件:PrefixedStringCodecFactory.java   
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:dubbo2    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:dubbox-hystrix    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:AeroStory    文件:GMCodecFactory.java   
public ProtocolDecoder getDecoder() throws Exception {
    return decoder;
}
项目:AeroStory    文件:GMCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:AeroStory    文件:MapleCodecFactory.java   
public ProtocolDecoder getDecoder() throws Exception {
    return decoder;
}
项目:AeroStory    文件:MapleCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:Lucid2.0    文件:MapleCodecFactory.java   
@Override
public ProtocolDecoder getDecoder() throws Exception {
    return decoder;
}
项目:dubbocloud    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:mina    文件:CommandCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:mina    文件:CommandCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:dubbos    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:sumk    文件:SumkCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:androidpn-server    文件:XmppCodecFactory.java   
/**
 * 返回一个新的(或可重复使用的)ProtocolDecoder实例
 */
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:dubbo-comments    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:dubbox    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:intransigentms    文件:MapleCodecFactory.java   
public ProtocolDecoder getDecoder() throws Exception {
    return decoder;
}
项目:dubbo    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:Mushy    文件:MapleCodecFactory.java   
@Override
public ProtocolDecoder getDecoder() throws Exception {
    return decoder;
}
项目:dubbo-learning    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:DubboCode    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:jahhan    文件:MinaCodecAdapter.java   
public ProtocolDecoder getDecoder() {
    return decoder;
}
项目:Camel    文件:HL7MLLPCodec.java   
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return new HL7MLLPDecoder(config);
}
项目:Camel    文件:TextLineCodecFactory.java   
public ProtocolDecoder getDecoder() throws Exception {
    return decoder;
}
项目:Camel    文件:Mina2TextLineCodecFactory.java   
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:jcode    文件:CustomexProtocalCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:jcode    文件:FixLengthProtocalCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}
项目:jcode    文件:BytesProtocalCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {

    return decoder;
}
项目:jcode    文件:LengthIdentifyProtocalCodecFactory.java   
@Override
public ProtocolDecoder getDecoder(IoSession session) throws Exception {
    return decoder;
}