java.lang.Object
io.helidon.webserver.transport.netty.epoll.EPollTransport
All Implemented Interfaces:
Transport

public final class EPollTransport extends Object implements Transport
A Transport implementation based upon Netty's epoll-based native transport.

This Transport implementation is currently experimental and its API and implementation are subject to change.

  • Constructor Details

    • EPollTransport

      public EPollTransport()
  • Method Details

    • isAvailableFor

      public boolean isAvailableFor(WebServer webServer)
      Returns true when Epoll.isAvailable() returns true and false otherwise.
      Specified by:
      isAvailableFor in interface Transport
      Parameters:
      webServer - the WebServer implementation in a deliberately undefined state and currently being constructed
      Returns:
      true when Epoll.isAvailable() returns true; false otherwise
    • createTransportArtifact

      public <T> Optional<T> createTransportArtifact(Class<T> artifactType, String artifactName, ServerConfiguration config)
      Returns an artifact corresponding to the supplied artifact coordinates, if one is available.

      Specifically, this method will return a non-empty Optional only if one of the following conditions is true:

      • artifactType is a subtype of EventLoopGroup and artifactName is exactly equal to either bossGroup or workerGroup
      • artifactType is a subtype of ChannelFactory and artifactName is exactly equal to serverChannelFactory
      Specified by:
      createTransportArtifact in interface Transport
      Type Parameters:
      T - the type of the transport artifact
      Parameters:
      artifactType - a Class indicating the kind of artifact to be returned; must not be null; may usefully only be a subtype of either EventLoopGroup or ChannelFactory<? extends ServerChannel>
      artifactName - a String indicating which of possibly several artifacts of the same kind to be returned; must not be null
      config - the ServerConfiguration in effect; must not be null
      Returns:
      an Optional, which may be empty but which will never be null
      Throws:
      NullPointerException - if any argument is null
      See Also:
      • Epoll
      • EpollEventLoopGroup
      • EpollServerSocketChannel