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

项目:neoscada    文件:SizeTest.java   
@Test
public void test1 () throws Exception
{
    final DataGenerator dg = new DataGenerator ( new HashSet<String> ( Arrays.asList ( "AVG", "MIN", "MAX" ) ), 1200 );
    final UpdateQueryData message = dg.createData ();

    final ProtocolEncoder encoder = new ObjectSerializationEncoder ();
    testEncoder ( encoder, message );
}
项目:sdrtrunk    文件:IcecastCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession ioSession) throws Exception
{
    if(mProtocolEncoder == null)
    {
        mProtocolEncoder = new IcecastEncoder();
    }

    return mProtocolEncoder;
}
项目:sdrtrunk    文件:UltravoxProtocolFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession ioSession) throws Exception
{
    if(mEncoder == null)
    {
        mEncoder = new UltravoxEncoder();
    }

    return mEncoder;
}
项目:ugcs-java-sdk    文件:MinaCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    MinaEncoder minaEncoder = null;
    Object value = session.getAttribute(ENCODER_ATTRIBUTE);
    if (value != null && value instanceof MinaEncoder)
        minaEncoder = (MinaEncoder) value;
    if (minaEncoder == null) {
        minaEncoder = new MinaEncoder(codecFactory.getEncoder());
        session.setAttribute(ENCODER_ATTRIBUTE, minaEncoder);
    }
    return minaEncoder;
}
项目:red5-server    文件:RTMPChannelFilter.java   
@Override
public void filterWrite(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception {
    Object message = writeRequest.getMessage();
    ProtocolEncoder encoder = getEncoder(session);
    ProtocolEncoderOutput encoderOut = new DirectOutput(session, nextFilter, writeRequest);
    try {
        encoder.encode(session, message, encoderOut);
        nextFilter.filterWrite(session, new EndOfMessage(writeRequest));
    } catch (ProtocolEncoderException e) {
        throw e;
    } catch (Throwable t) {
        throw new ProtocolEncoderException(t);
    }
}
项目:jforgame    文件:MessageCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession arg0) throws Exception {
    return encoder;
}
项目:io-comparison    文件:MsgCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return msgEncoder;
}
项目:EatDubbo    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:neoscada    文件:ModbusRtuProtocolCodecFilter.java   
public ModbusRtuProtocolCodecFilter ( final ProtocolEncoder encoder, final ModbusRtuDecoder decoder )
{
    super ( encoder, decoder );
    this.decoder = decoder;
}
项目:neoscada    文件:ObjectSerializationCodecFactory.java   
public ProtocolEncoder getEncoder(IoSession session) {
    return encoder;
}
项目:neoscada    文件:DemuxingProtocolCodecFactory.java   
/**
 * {@inheritDoc}
 */
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:neoscada    文件:TextLineCodecFactory.java   
public ProtocolEncoder getEncoder(IoSession session) {
    return encoder;
}
项目:neoscada    文件:PrefixedStringCodecFactory.java   
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:neoscada    文件:SizeTest.java   
private void testEncoder ( final ProtocolEncoder encoder, final Object message ) throws Exception
{
    final TestingOutput output = new TestingOutput ();
    encoder.encode ( null, message, output );
    System.out.println ( String.format ( "Encoder %s: %s bytes", encoder, output.getSize () ) );
}
项目:dubbo2    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:dubbox-hystrix    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:AeroStory    文件:GMCodecFactory.java   
public ProtocolEncoder getEncoder() throws Exception {
    return encoder;
}
项目:AeroStory    文件:GMCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:AeroStory    文件:MapleCodecFactory.java   
public ProtocolEncoder getEncoder() throws Exception {
    return encoder;
}
项目:AeroStory    文件:MapleCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:Lucid2.0    文件:MapleCodecFactory.java   
@Override
public ProtocolEncoder getEncoder() throws Exception {
    return encoder;
}
项目:dubbocloud    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:mina    文件:CommandCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:mina    文件:CommandCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:dubbos    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:sumk    文件:SumkCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:androidpn-server    文件:XmppCodecFactory.java   
/**
 * 返回一个新的(或可重复使用的)ProtocolEncoder实例
 */
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:dubbo-comments    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:dubbox    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:intransigentms    文件:MapleCodecFactory.java   
public ProtocolEncoder getEncoder() throws Exception {
    return encoder;
}
项目:dubbo    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:Mushy    文件:MapleCodecFactory.java   
@Override
public ProtocolEncoder getEncoder() throws Exception {
    return encoder;
}
项目:dubbo-learning    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:DubboCode    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:jahhan    文件:MinaCodecAdapter.java   
public ProtocolEncoder getEncoder() {
    return encoder;
}
项目:Camel    文件:HL7MLLPCodec.java   
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return new HL7MLLPEncoder(config);
}
项目:Camel    文件:TextLineCodecFactory.java   
public ProtocolEncoder getEncoder() throws Exception {
    return encoder;
}
项目:Camel    文件:Mina2TextLineCodecFactory.java   
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}
项目:jcode    文件:CustomexProtocalCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;

}
项目:jcode    文件:FixLengthProtocalCodecFactory.java   
@Override
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
    return encoder;
}