Examples of StringDecoder


Examples of io.netty.handler.codec.string.StringDecoder

    @Override
    protected JndiRegistry createRegistry() throws Exception {
        JndiRegistry registry = super.createRegistry();
        StringEncoder stringEncoder = new StringEncoder();

        StringDecoder stringDecoder = new StringDecoder();

        registry.bind("encoder", stringEncoder);
        registry.bind("decoder", stringDecoder);
        return registry;
    }
View Full Code Here

Examples of io.netty.handler.codec.string.StringDecoder

        protected void initChannel(Channel ch) throws Exception {
           
            ChannelPipeline channelPipeline = ch.pipeline();
            clientInvoked = true;
            channelPipeline.addLast("decoder-DELIM", new DelimiterBasedFrameDecoder(maxLineSize, true, Delimiters.lineDelimiter()));
            channelPipeline.addLast("decoder-SD", new StringDecoder(CharsetUtil.UTF_8));
            channelPipeline.addLast("encoder-SD", new StringEncoder(CharsetUtil.UTF_8));
            channelPipeline.addLast("handler", new ClientChannelHandler(producer));
        }
View Full Code Here

Examples of io.netty.handler.codec.string.StringDecoder

        protected void initChannel(Channel ch) throws Exception {
            ChannelPipeline channelPipeline = ch.pipeline();
            serverInvoked = true;
            channelPipeline.addLast("encoder-SD", new StringEncoder(CharsetUtil.UTF_8));
            channelPipeline.addLast("decoder-DELIM", new DelimiterBasedFrameDecoder(maxLineSize, true, Delimiters.lineDelimiter()));
            channelPipeline.addLast("decoder-SD", new StringDecoder(CharsetUtil.UTF_8));
            channelPipeline.addLast("handler", new ServerChannelHandler(consumer));
        }
View Full Code Here

Examples of io.netty.handler.codec.string.StringDecoder

        protected void initChannel(Channel ch) throws Exception {
           
            ChannelPipeline channelPipeline = ch.pipeline();
            clientInvoked = true;
            channelPipeline.addLast("decoder-DELIM", new DelimiterBasedFrameDecoder(maxLineSize, true, Delimiters.lineDelimiter()));
            channelPipeline.addLast("decoder-SD", new StringDecoder(CharsetUtil.UTF_8));
            channelPipeline.addLast("encoder-SD", new StringEncoder(CharsetUtil.UTF_8));
            channelPipeline.addLast("handler", new ClientChannelHandler(producer));
          
        }
View Full Code Here

Examples of kafka.serializer.StringDecoder

    consumerProps.setProperty("zookeeper.connect", updateQueueLockMaster);
    ConsumerConfig consumerConfig = new ConsumerConfig(consumerProps);
    consumer = Consumer$.MODULE$.createJavaConsumerConnector(consumerConfig);
    KafkaStream<String,U> stream =
        consumer.createMessageStreams(Collections.singletonMap(updateTopic, 1),
                                      new StringDecoder(null),
                                      loadDecoderInstance())
            .get(updateTopic).get(0);
    final Iterator<KeyMessage<String,U>> transformed = Iterators.transform(stream.iterator(),
        new Function<MessageAndMetadata<String,U>, KeyMessage<String,U>>() {
          @Override
View Full Code Here

Examples of org.getopt.luke.decoders.StringDecoder

    String fName = (String)getProperty(row, "fName");
    Object choice = getSelectedItem(combo);
    String decName = getString(choice, "name");
    Decoder dec = null;
    if (decName.equals("s")) {
      dec = new StringDecoder();
    } else if (decName.equals("b")) {
      dec = new BinaryDecoder();
    } else if (decName.equals("d")) {
      dec = new DateDecoder();
    } else if (decName.equals("nl")) {
View Full Code Here

Examples of org.jboss.netty.handler.codec.string.StringDecoder

      }
      List<ChannelBuffer> delims = new ArrayList<ChannelBuffer>();
      delims.add(SEMICOL_DELIM);
      pipeline.addLast("frameDecoder", new DelimiterBasedFrameDecoder(65536, true, true, delims.toArray(new ChannelBuffer[delims.size()])));
      //pipeline.addLast("logger", new LoggingHandler(InternalLogLevel.INFO));
      pipeline.addLast("stringDecoder", new StringDecoder(CharsetUtil.UTF_8));
      pipeline.addLast("exec-handler", execHandler);
      pipeline.addLast("submission-handler", submissionHandler);
      pipeline.sendUpstream(new UpstreamMessageEvent(channel, buffer, channel.getRemoteAddress()));
      return null;
    }
View Full Code Here

Examples of org.jboss.netty.handler.codec.string.StringDecoder

          true,
          true,
          new ChannelBuffer[]{ChannelBuffers.wrappedBuffer("|".getBytes())}
    );
    // The String decoder is sharable so we wrap it in a simple SharedChannelHandlerProvider
    ChannelHandlerProvider stringDecoder = ChannelHandlerProviderFactory.getInstance("stringDecoder", new StringDecoder());
    // Lastly, we need a "business" handler. It is sharable so we wrap it in a simple SharedChannelHandlerProvider
    ChannelHandlerProvider stringReporter = ChannelHandlerProviderFactory.getInstance("stringReporter", new StringReporter());
   
   
    // We want to send some numbers back to the caller, so we need an ObjectEncoder
View Full Code Here

Examples of org.jboss.netty.handler.codec.string.StringDecoder

        bootstrap = new ConnectionlessBootstrap(new NioDatagramChannelFactory());
        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            @Override
            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline channelPipeline = Channels.pipeline();
                channelPipeline.addLast("StringDecoder", new StringDecoder(CharsetUtil.UTF_8));
                channelPipeline.addLast("ContentHandler", new ContentHandler());
                return channelPipeline;
            }
        });
View Full Code Here

Examples of org.jboss.netty.handler.codec.string.StringDecoder

        bootstrap = new ConnectionlessBootstrap(new NioDatagramChannelFactory());
        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            @Override
            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline channelPipeline = Channels.pipeline();
                channelPipeline.addLast("StringDecoder", new StringDecoder(CharsetUtil.UTF_8));
                channelPipeline.addLast("ContentHandler", new ContentHandler());
                return channelPipeline;
            }
        });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.