Class IOUringTransport

    • Constructor Detail

      • IOUringTransport

        public IOUringTransport()
    • Method Detail

      • isAvailableFor

        public boolean isAvailableFor​(WebServer webServer)
        Returns true when IOUring.isAvailable() returns true and false otherwise.
        Specified by:
        isAvailableFor in interface Transport
        webServer - the WebServer implementation in a deliberately undefined state and currently being constructed
        true when IOUring.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
        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
        an Optional, which may be empty but which will never be null
        NullPointerException - if any argument is null
        See Also:
        IOUring, IOUringEventLoopGroup, IOUringServerSocketChannel