Class SurefireMasterProcessChannelProcessorFactory

    • Field Detail

      • clientSocketChannel

        private volatile java.nio.channels.AsynchronousSocketChannel clientSocketChannel
    • Constructor Detail

      • SurefireMasterProcessChannelProcessorFactory

        public SurefireMasterProcessChannelProcessorFactory()
    • Method Detail

      • canUse

        public boolean canUse​(java.lang.String channelConfig)
        Description copied from interface: MasterProcessChannelProcessorFactory
        Evaluates the channelConfig.
        Parameters:
        channelConfig - a connection string used by the fork JVM
        Returns:
        true if channelConfig is applicable and thus this SPI is eligible in the fork
      • connect

        public void connect​(java.lang.String channelConfig)
                     throws java.io.IOException
        Description copied from interface: MasterProcessChannelProcessorFactory
        Open a new connection.
        Parameters:
        channelConfig - e.g. "pipe://3" or "tcp://localhost:65035"
        Throws:
        java.io.IOException - if cannot connect
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class AbstractMasterProcessChannelProcessorFactory
        Throws:
        java.io.IOException
      • setTrueOptions

        @SafeVarargs
        private final void setTrueOptions​(java.net.SocketOption<java.lang.Boolean>... options)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • extractSessionId

        private static java.lang.String extractSessionId​(java.net.URI uri)