Examples of ChannelFactory


Examples of org.jboss.messaging.core.contract.ChannelFactory

                 
         FilterFactory ff = new SelectorFactory();
        
         if (clustered)
         {       
            ChannelFactory jChannelFactory = null;

           if (channelFactoryName != null)
            {
               Object info = null;
               try
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

       
        if (maxWorkers == 0) {
          maxWorkers = Runtime.getRuntime().availableProcessors();
        }
   
        ChannelFactory factory = new NioServerSocketChannelFactory(this.nettyPool, this.nettyPool, maxWorkers);
       
        ServerBootstrap bootstrap = new ServerBootstrap(factory);
        this.channelHandler = createChannelPipelineFactory(config, storageManager);
        bootstrap.setPipelineFactory(channelHandler);
        if (inputBufferSize != 0) {
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

  public static void main(String[] args)
  {
    int port = Integer.parseInt(args[0]);
   
    ChannelFactory factory =
            new NioServerSocketChannelFactory(
                    Executors.newCachedThreadPool(),
                    Executors.newCachedThreadPool());

        ServerBootstrap bootstrap = new ServerBootstrap(factory);
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

  public static void main(String[] args) throws Exception
  {
    String host = args[0];
    int port = Integer.parseInt(args[1]);
   
    ChannelFactory factory =
            new NioClientSocketChannelFactory(
                    Executors.newCachedThreadPool(),
                    Executors.newCachedThreadPool());

        bootstrap = new ClientBootstrap(factory);
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

     *         if the factory is not set for this bootstrap yet.
     *         The factory can be set in the constructor or
     *         {@link #setFactory(ChannelFactory)}.
     */
    public ChannelFactory getFactory() {
        ChannelFactory factory = this.factory;
        if (factory == null) {
            throw new IllegalStateException(
                    "factory is not set yet.");
        }
        return factory;
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

    this(bufferByteOrder, ServerType.LOCAL);
  }

  public SimpleTestServerConnection(ByteOrder bufferByteOrder, ServerType serverType)
  {
    ChannelFactory channelFactory;
    _serverType = serverType;
    switch (serverType)
    {
    case LOCAL: channelFactory = new DefaultLocalServerChannelFactory(); break;
    case NIO:
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

    }
  }

  @Override
  public void start() {
    ChannelFactory factory = new NioServerSocketChannelFactory(
        Executors.newCachedThreadPool(), Executors.newCachedThreadPool());

    ServerBootstrap serverBootstrap = new ServerBootstrap(factory);
    serverBootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      @Override
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

    bootServer();
    clog("DateSender Example");
    try {
      Executor bossPool = Executors.newCachedThreadPool();
      Executor workerPool = Executors.newCachedThreadPool();
      final ChannelFactory channelFactory = new NioClientSocketChannelFactory(bossPool, workerPool);
      ChannelPipelineFactory pipelineFactory = new ChannelPipelineFactory() {
        public ChannelPipeline getPipeline() throws Exception {
          return Channels.pipeline(
            new ObjectEncoder()
          );
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

    bootServer();
    clog("DateModifier Example");
    try {
      Executor bossPool = Executors.newCachedThreadPool();
      Executor workerPool = Executors.newCachedThreadPool();
      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())),
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFactory

 
  public static void main(String[] args) throws UnknownHostException
  {
    String host = "localhost";
    int port = 18090;
    ChannelFactory factory = new NioClientSocketChannelFactory(Executors
        .newCachedThreadPool(), Executors.newCachedThreadPool());
    final DefenderHandler defHandler = new DefenderHandler();
    PipelineFactory defFactory = new PipelineFactory(defHandler);
    final ZombieHandler zomHandler = new ZombieHandler();
    PipelineFactory zomFactory = new PipelineFactory(zomHandler);
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.