Introduction

In order to build a server, you need to select an implementation of the IoAcceptor interface.

IoAcceptor

Basically, this interface is named because of the accept() method, responsible for the creation of new connection between a client and the server. The server accepts incoming connection request.

At some point, we could have named this interface 'Server'.

As we may deal with more than one kind of transport (TCP/UDP/...), we have more than one implementation for this interface. It would be very unlikely that you need to implement a new one.

We have many of those implementing classes

  • NioSocketAcceptor : the non-blocking Socket transport Acceptor
  • NioDatagramAcceptor : the non-blocking UDP transport Acceptor
  • AprSocketAcceptor : the blocking Socket transport Acceptor, based on APR
  • VmPipeSocketAcceptor : the in-VM Acceptor

Just pick the one that fit your need.

Here is the class diagram for the IoAcceptor interfaces and classes :

(The editable file is available here)