Examples of addBefore()


Examples of org.jboss.netty.channel.ChannelPipeline.addBefore()

        origChannelFacotry = new TcpMessagePipelineFactory(LOG, null, receiveExecutor) {

            @Override
            public ChannelPipeline getPipeline() throws Exception {
                final ChannelPipeline pipeline = super.getPipeline();
                pipeline.addBefore("messageCodec", "nodeNameWriter", new ChannelNodeNameWriter(cluster));
                pipeline.addBefore("nodeNameWriter", "nodeInfoSetter", new SimpleChannelUpstreamHandler() {

                    @Override
                    public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
                        if (nodeName == null)
View Full Code Here

Examples of org.jboss.netty.channel.ChannelPipeline.addBefore()

            @Override
            public ChannelPipeline getPipeline() throws Exception {
                final ChannelPipeline pipeline = super.getPipeline();
                pipeline.addBefore("messageCodec", "nodeNameWriter", new ChannelNodeNameWriter(cluster));
                pipeline.addBefore("nodeNameWriter", "nodeInfoSetter", new SimpleChannelUpstreamHandler() {

                    @Override
                    public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
                        if (nodeName == null)
                            throw new RuntimeException("nodeName not set!");
View Full Code Here

Examples of org.jboss.netty.channel.ChannelPipeline.addBefore()

    }
   
    @Override
    public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline pipeLine = super.getPipeline();
        pipeLine.addBefore(HandlerConstants.CORE_HANDLER, "countHandler", getConnectionCountHandler());
       
        return pipeLine;
    }
   
    /**
 
View Full Code Here

Examples of org.jboss.netty.channel.ChannelPipeline.addBefore()

        origChannelFacotry = new TcpMessagePipelineFactory(LOG, channels, receiveExecutor) {
            @Override
            public ChannelPipeline getPipeline() throws Exception {
                final ChannelPipeline pipeline = super.getPipeline();
                pipeline.addBefore("messageCodec", "nodeNameReader", new ChannelNodeNameReader(cluster));
                pipeline.addLast("router", channelHandler);
                if (testHandler != null)
                    pipeline.addLast("test", testHandler);
                return pipeline;
            }
View Full Code Here

Examples of org.jboss.netty.channel.ChannelPipeline.addBefore()

        origChannelFacotry = new TcpMessagePipelineFactory(LOG, null, receiveExecutor) {
            @Override
            public ChannelPipeline getPipeline() throws Exception {
                final ChannelPipeline pipeline = super.getPipeline();
                pipeline.addBefore("messageCodec", "nodeNameWriter", new ChannelNodeNameWriter(cluster));
                pipeline.addBefore("nodeNameWriter", "nodeInfoSetter", new SimpleChannelUpstreamHandler() {
                    @Override
                    public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
                        if (nodeName == null)
                            throw new RuntimeException("nodeName not set!");
View Full Code Here

Examples of org.jboss.netty.channel.ChannelPipeline.addBefore()

        origChannelFacotry = new TcpMessagePipelineFactory(LOG, null, receiveExecutor) {
            @Override
            public ChannelPipeline getPipeline() throws Exception {
                final ChannelPipeline pipeline = super.getPipeline();
                pipeline.addBefore("messageCodec", "nodeNameWriter", new ChannelNodeNameWriter(cluster));
                pipeline.addBefore("nodeNameWriter", "nodeInfoSetter", new SimpleChannelUpstreamHandler() {
                    @Override
                    public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
                        if (nodeName == null)
                            throw new RuntimeException("nodeName not set!");
                        final NodeInfo ni = cluster.getNodeInfoByName(nodeName);
View Full Code Here

Examples of org.jboss.netty.channel.ChannelPipeline.addBefore()

        ImapMessage message = (ImapMessage) e.getMessage();
        ChannelPipeline cp = ctx.getPipeline();

        try {
            if (cp.get(NettyConstants.EXECUTION_HANDLER) != null) {
                cp.addBefore(NettyConstants.EXECUTION_HANDLER, NettyConstants.HEARTBEAT_HANDLER, heartbeatHandler);
            } else {
                cp.addBefore(NettyConstants.CORE_HANDLER, NettyConstants.HEARTBEAT_HANDLER, heartbeatHandler);

            }
            final ResponseEncoder responseEncoder = new ResponseEncoder(encoder, response, session);
View Full Code Here

Examples of org.jetbrains.lang.manifest.psi.Section.addBefore()

    List<Header> headers = manifestFile.getHeaders();
    if (section == null) {
      manifestFile.add(newHeader.getParent());
    }
    else if (headers.isEmpty()) {
      section.addBefore(newHeader, section.getFirstChild());
    }
    else {
      section.addAfter(newHeader, headers.get(headers.size() - 1));
    }
  }
View Full Code Here

Examples of org.jetbrains.plugins.clojure.psi.api.ClListLike.addBefore()

    // Insert a new class into it
    final PsiElement lastChild = importMember.getLastChild();
    final PsiElement newClass = createSymbolNodeFromText(suffix).getPsi();
    assert newClass != null;
    if (lastChild instanceof  LeafPsiElement) {
      importMember.addBefore(newClass, lastChild);
    } else {
      importMember.add(newClass);
    }

    return importMember;
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.addBefore()

      if (this.propertySourceNames.isEmpty()) {
        propertySources.addLast(propertySource);
      }
      else {
        String firstProcessed = this.propertySourceNames.get(this.propertySourceNames.size() - 1);
        propertySources.addBefore(firstProcessed, propertySource);
      }
    }
    this.propertySourceNames.add(name);
  }
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.