Package org.jboss.netty.handler.codec.serialization

Examples of org.jboss.netty.handler.codec.serialization.ObjectDecoder


    // Set up the pipeline factory.
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      public ChannelPipeline getPipeline() throws Exception {
        return Channels.pipeline(
          new ObjectDecoder(ClassResolvers.cacheDisabled(getClass().getClassLoader())),
          new SimpleChannelHandler() {
            public void messageReceived(ChannelHandlerContext ctx,MessageEvent e) throws Exception {
              Date date = (Date)e.getMessage();
              slog("Hey Guys !  I got a date ! [" + date + "]");
              super.messageReceived(ctx, e);
View Full Code Here


      final ChannelFactory channelFactory = new NioClientSocketChannelFactory(bossPool, workerPool);
      ChannelPipelineFactory pipelineFactory = new ChannelPipelineFactory() {
        public ChannelPipeline getPipeline() throws Exception {
          return Channels.pipeline(
            new ObjectEncoder(),
            new ObjectDecoder(ClassResolvers.cacheDisabled(getClass().getClassLoader())),
            new ClientDateHandler()           
          );
        }
      };
      ClientBootstrap bootstrap = new ClientBootstrap(channelFactory);
View Full Code Here

    // Set up the pipeline factory.
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      public ChannelPipeline getPipeline() throws Exception {
        return Channels.pipeline(
          new ObjectDecoder(ClassResolvers.cacheDisabled(getClass().getClassLoader())),
          new ObjectEncoder(),
          new ServerDateHandler()
        );
      };
    });
View Full Code Here

    jobManager.setJobBuilder(mixJobBuilder);
    jobManager.setJobExporter(fileJobExporter);
    jobManager.setJobResultMerger(jobResultMerger);
   
    masterConnector.setDownstreamHandler(new ObjectEncoder());
    masterConnector.setUpstreamHandler(new ObjectDecoder());
   
    masterNode.setJobManager(jobManager);
    masterNode.setMasterConnector(masterConnector)
    masterNode.setMonitor(monitor);
   
View Full Code Here

    SlaveNode slaveNode = new SlaveNode();
    JobResultMerger jobResultMerger2 = new JobResultMerger();
    SocketSlaveConnector slaveConnector = new SocketSlaveConnector();
    SlaveMonitor monitor = new SlaveMonitor();
    slaveConnector.setDownstreamHandler(new ObjectEncoder());
    slaveConnector.setUpstreamHandler(new ObjectDecoder());
     
    StatisticsEngine statisticsEngine = new StatisticsEngine();
    SlaveConfig slaveConfig = new SlaveConfig();
    slaveConfig.load(configfile);
    slaveNode.setConfig(slaveConfig);
View Full Code Here

        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            public ChannelPipeline getPipeline() {
                ChannelPipeline pipe =
                        Channels.pipeline(
                            new ObjectEncoder(),
                            new ObjectDecoder(Integer.MAX_VALUE, ClassResolvers.weakCachingConcurrentResolver(this
                                .getClass().getClassLoader())), new MasterConnectorHandler(masterNode));
                pipe.addLast("log", new LoggingHandler());
                return pipe;
            }
        });
View Full Code Here

        monitor = new MasterMonitor();
        httpAgentNode = new HttpAgentNode();
       
        ((MasterNode)node).setConfig((MasterConfig)nodeConfig);
       
        ObjectDecoder objDecoder = new ObjectDecoder(Integer.MAX_VALUE, ClassResolvers.weakCachingConcurrentResolver(this.getClass().getClassLoader()));
        ((SocketMasterConnector)masterConnector).setDownstreamHandler(new ObjectEncoder());
        ((SocketMasterConnector)masterConnector).setUpstreamHandler(objDecoder);
       
        jobManager.setJobBuilder(jobBuilder);
        jobManager.setJobExporter(jobExporter);
View Full Code Here

            log.error("init jobExporter failed", e);
        }
        ((FileOutputAdaptor)fileOutputAdaptor).setJobExporter(jobExporter);
       
        ((SocketSlaveConnector)slaveConnector).setDownstreamHandler(new ObjectEncoder(8192 * 4));
        ((SocketSlaveConnector)slaveConnector).setUpstreamHandler(new ObjectDecoder(Integer.MAX_VALUE, ClassResolvers.weakCachingConcurrentResolver(this.getClass().getClassLoader())));
       
        ((SlaveNode)node).setConfig((SlaveConfig) nodeConfig);
        ((SlaveNode)node).setJobResultMerger(jobResultMerger);
        ((SlaveNode)node).setSlaveConnector(slaveConnector);
        ((SlaveNode)node).setStatisticsEngine(statisticsEngine);
View Full Code Here

        bootstrap = new ClientBootstrap(factory);

        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            public ChannelPipeline getPipeline() {
                ChannelPipeline pipe =
                        Channels.pipeline(new ObjectEncoder(8192 * 4), new ObjectDecoder(Integer.MAX_VALUE,
                            ClassResolvers.weakCachingConcurrentResolver(this.getClass().getClassLoader())),
                            new SlaveConnectorHandler(responseQueue, slaveNode));
                pipe.addLast("log", new LoggingHandler());
                return pipe;
            }
View Full Code Here

        comBootstrap.setPipelineFactory(new ChannelPipelineFactory() {

           @Override
           public ChannelPipeline getPipeline() throws Exception {
              ChannelPipeline pipeline = Channels.pipeline();
              pipeline.addLast("decoder", new ObjectDecoder());
              pipeline.addLast("encoder", new ObjectEncoder());
              pipeline.addLast("handler", comHandler);
              return pipeline;
           }
        });       
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.codec.serialization.ObjectDecoder

Copyright © 2018 www.massapicom. 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.