Package org.jboss.netty.channel.group

Examples of org.jboss.netty.channel.group.DefaultChannelGroup


  public void start() {
    // TODO provide tweakable options here for passing in custom executors.
    channelFactory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors
        .newCachedThreadPool());

    allChannels = new DefaultChannelGroup("jmemcachedChannelGroup");

    ServerBootstrap bootstrap = new ServerBootstrap(channelFactory);

    ChannelPipelineFactory pipelineFactory;
    if (binary)
View Full Code Here


    public NettyConsumer(NettyEndpoint nettyEndpoint, Processor processor, NettyConfiguration configuration) {
        super(nettyEndpoint, processor);
        this.context = this.getEndpoint().getCamelContext();
        this.configuration = configuration;
        this.allChannels = new DefaultChannelGroup("NettyProducer-" + nettyEndpoint.getEndpointUri());
    }
View Full Code Here

    public NettyConsumer(NettyEndpoint nettyEndpoint, Processor processor, NettyConfiguration configuration) {
        super(nettyEndpoint, processor);
        this.context = this.getEndpoint().getCamelContext();
        this.configuration = configuration;
        this.allChannels = new DefaultChannelGroup("NettyProducer-" + nettyEndpoint.getEndpointUri());
    }
View Full Code Here

    public NettyProducer(NettyEndpoint nettyEndpoint, NettyConfiguration configuration) {
        super(nettyEndpoint);
        this.configuration = configuration;
        this.context = this.getEndpoint().getCamelContext();
        this.allChannels = new DefaultChannelGroup("NettyProducer-" + nettyEndpoint.getEndpointUri());
        this.noReplyLogger = new Logger(LOG, configuration.getNoReplyLogLevel());
    }
View Full Code Here

    public NettyConsumer(NettyEndpoint nettyEndpoint, Processor processor, NettyConfiguration configuration) {
        super(nettyEndpoint, processor);
        this.context = this.getEndpoint().getCamelContext();
        this.configuration = configuration;
        this.allChannels = new DefaultChannelGroup("NettyProducer-" + nettyEndpoint.getEndpointUri());
    }
View Full Code Here

        private final EnumMap<Event.Type, ChannelGroup> groups = new EnumMap<Event.Type, ChannelGroup>(Event.Type.class);

        public ConnectionTracker()
        {
            for (Event.Type type : Event.Type.values())
                groups.put(type, new DefaultChannelGroup(type.toString()));
        }
View Full Code Here

        private final EnumMap<Event.Type, ChannelGroup> groups = new EnumMap<Event.Type, ChannelGroup>(Event.Type.class);

        public ConnectionTracker()
        {
            for (Event.Type type : Event.Type.values())
                groups.put(type, new DefaultChannelGroup(type.toString()));
        }
View Full Code Here

    public NettyConsumer(NettyEndpoint nettyEndpoint, Processor processor, NettyConfiguration configuration) {
        super(nettyEndpoint, processor);
        this.context = this.getEndpoint().getCamelContext();
        this.configuration = configuration;
        this.allChannels = new DefaultChannelGroup("NettyConsumer-" + nettyEndpoint.getEndpointUri());
    }
View Full Code Here

    /*
     * gather connections related to the targetUuid requested
     */
    @Override
    public void createSession(SourceHandler sourceHandler, Class<? extends TargetHandler> targetHandler, String targetUuid) {
        ChannelGroup group = new DefaultChannelGroup();
        HashSet<String> uuids = new HashSet<>();
        boolean breakOnMatch = targetUuid != null && !targetUuid.isEmpty();
        int sessionID = nextSession.incrementAndGet();
        synchronized (connectedChannels) {
            for (ChannelState state : connectedChannels) {
                if (
                        (targetUuid == MeshyConstants.LINK_ALL) ||
                        (targetUuid == MeshyConstants.LINK_NAMED && state.getRemoteAddress() != null) ||
                        (state.getName() != null && targetUuid.equals(state.getName()))
                        ) {
                    /* prevent dups if >1 connection to the same host */
                    if (state.getName() != null && !uuids.add(state.getName())) {
                        continue;
                    }
                    group.add(state.getChannel());
                    /* add channel callback path to source */
                    state.addSourceHandler(sessionID, sourceHandler);
                    if (breakOnMatch) {
                        break;
                    }
View Full Code Here

            ThriftServerDef def = ThriftServerDef.newBuilder()
                                                 .listen(0)
                                                 .withProcessor(processor)
                                                 .speaks(protocolFactory).build();

            server = new NettyServerTransport(def, NettyServerConfig.newBuilder().build(), new DefaultChannelGroup());
            server.start();
        }
View Full Code Here

TOP

Related Classes of org.jboss.netty.channel.group.DefaultChannelGroup

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.