Package org.apache.maven.surefire.spi
Interface MasterProcessChannelProcessorFactory
- All Superinterfaces:
AutoCloseable
,Closeable
The SPI interface, a factory of an encoder and a decoder.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Evaluates thechannelConfig
.void
Open a new connection.org.apache.maven.surefire.api.booter.MasterProcessChannelDecoder
createDecoder
(org.apache.maven.surefire.api.fork.ForkNodeArguments forkingArguments) Decoder factory method.org.apache.maven.surefire.api.booter.MasterProcessChannelEncoder
createEncoder
(org.apache.maven.surefire.api.fork.ForkNodeArguments forkingArguments) Encoder factory method.
-
Method Details
-
canUse
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
Open a new connection.- Parameters:
channelConfig
- e.g. "pipe://3" or "tcp://localhost:65035"- Throws:
IOException
- if cannot connect
-
createDecoder
org.apache.maven.surefire.api.booter.MasterProcessChannelDecoder createDecoder(@Nonnull org.apache.maven.surefire.api.fork.ForkNodeArguments forkingArguments) throws IOException Decoder factory method.- Parameters:
forkingArguments
- forking arguments- Returns:
- a new instance of decoder
- Throws:
IOException
-
createEncoder
org.apache.maven.surefire.api.booter.MasterProcessChannelEncoder createEncoder(@Nonnull org.apache.maven.surefire.api.fork.ForkNodeArguments forkingArguments) throws IOException Encoder factory method.- Parameters:
forkingArguments
- forking arguments- Returns:
- a new instance of encoder
- Throws:
IOException
-