Package org.apache.mina.core.buffer

Examples of org.apache.mina.core.buffer.SimpleBufferAllocator


   
   
    public void start() {
        IoBuffer.setUseDirectBuffer(false);
        IoBuffer.setAllocator(new SimpleBufferAllocator());

        acceptor = new NioSocketAcceptor();

//        cfg.getFilterChain().addLast("mimemessage1", new MimeMessageIOFilter() );
        acceptor.getFilterChain().addLast("logger", new LoggingFilter());
View Full Code Here


    if ( server_instance != null ) server_instance.close();
  }

  @Override
  protected void setUp() throws Exception {
    final SimpleBufferAllocator delegate = new SimpleBufferAllocator();
//    IoBuffer.setAllocator( new IoBufferAllocator() {
//      @Override
//      public IoBuffer allocate( int capacity, boolean direct ) {
//        System.out.println( "*** allocate: " + capacity + ", " + direct );
//        return delegate.allocate( capacity, direct );
View Full Code Here

  public void start() throws Exception {
    initIOHandler();
    IoBuffer.setUseDirectBuffer(!useHeapBuffers); // this is global, oh well
    if (useHeapBuffers) {
      // dont pool for heap buffers
      IoBuffer.setAllocator(new SimpleBufferAllocator());
    }
    log.info("RTMP Mina Transport Settings\nAcceptor style: {} I/O threads: {}\nTCP no-delay: {} keep-alive: {}", new Object[] {
        (enableDefaultAcceptor ? "default" : "blocking-queue"), ioThreads, tcpNoDelay, keepAlive });
    // use the defaults
    if (enableDefaultAcceptor) {
View Full Code Here

    if ( server_instance != null ) server_instance.close();
  }

  @Override
  protected void setUp() throws Exception {
    final SimpleBufferAllocator delegate = new SimpleBufferAllocator();
//    IoBuffer.setAllocator( new IoBufferAllocator() {
//      @Override
//      public IoBuffer allocate( int capacity, boolean direct ) {
//        System.out.println( "*** allocate: " + capacity + ", " + direct );
//        return delegate.allocate( capacity, direct );
View Full Code Here

  private List<TapRule> tapRules = Lists.newArrayList();

  public SwitchHandler(NioDatagramAcceptor acceptor) {
    this.acceptor = acceptor;
    allocator = new SimpleBufferAllocator();
   
    addTelexHandler(new SeeHandler());
    addTelexHandler(new TapHandler());
    addTelexHandler(new EndSignalHandler());
  }
View Full Code Here

TOP

Related Classes of org.apache.mina.core.buffer.SimpleBufferAllocator

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.