Class SurefireMasterProcessChannelProcessorFactory
java.lang.Object
org.apache.maven.surefire.booter.spi.AbstractMasterProcessChannelProcessorFactory
org.apache.maven.surefire.booter.spi.SurefireMasterProcessChannelProcessorFactory
- All Implemented Interfaces:
Closeable
,AutoCloseable
,MasterProcessChannelProcessorFactory
public class SurefireMasterProcessChannelProcessorFactory
extends AbstractMasterProcessChannelProcessorFactory
Producer of TCP/IP encoder and decoder.
- Since:
- 3.0.0-M5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Evaluates thechannelConfig
.void
close()
void
Open a new connection.createDecoder
(ForkNodeArguments forkingArguments) Decoder factory method.createEncoder
(ForkNodeArguments forkingArguments) Encoder factory method.private static String
extractSessionId
(URI uri) private final void
setTrueOptions
(SocketOption<Boolean>... options) Methods inherited from class org.apache.maven.surefire.booter.spi.AbstractMasterProcessChannelProcessorFactory
schedulePeriodicFlusher
-
Field Details
-
FLUSH_PERIOD_MILLIS
private static final int FLUSH_PERIOD_MILLIS- See Also:
-
clientSocketChannel
-
-
Constructor Details
-
SurefireMasterProcessChannelProcessorFactory
public SurefireMasterProcessChannelProcessorFactory()
-
-
Method Details
-
canUse
Description copied from interface:MasterProcessChannelProcessorFactory
Evaluates thechannelConfig
.- Parameters:
channelConfig
- a connection string used by the fork JVM- Returns:
true
ifchannelConfig
is applicable and thus this SPI is eligible in the fork
-
connect
Description copied from interface:MasterProcessChannelProcessorFactory
Open a new connection.- Parameters:
channelConfig
- e.g. "pipe://3" or "tcp://localhost:65035"- Throws:
IOException
- if cannot connect
-
createDecoder
Description copied from interface:MasterProcessChannelProcessorFactory
Decoder factory method.- Parameters:
forkingArguments
- forking arguments- Returns:
- a new instance of decoder
-
createEncoder
Description copied from interface:MasterProcessChannelProcessorFactory
Encoder factory method.- Parameters:
forkingArguments
- forking arguments- Returns:
- a new instance of encoder
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAbstractMasterProcessChannelProcessorFactory
- Throws:
IOException
-
setTrueOptions
- Throws:
IOException
-
extractSessionId
-