Interface MasterProcessChannelProcessorFactory

All Superinterfaces:
AutoCloseable, Closeable

public interface MasterProcessChannelProcessorFactory extends Closeable
The SPI interface, a factory of an encoder and a decoder.
  • Method Details

    • canUse

      boolean canUse(String channelConfig)
      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

      void connect(String channelConfig) throws IOException
      Open a new connection.
      Parameters:
      channelConfig - e.g. "pipe://3" or "tcp://localhost:65035"
      Throws:
      IOException - if cannot connect
    • createDecoder

      MasterProcessChannelDecoder createDecoder(@Nonnull ForkNodeArguments forkingArguments) throws IOException
      Decoder factory method.
      Parameters:
      forkingArguments - forking arguments
      Returns:
      a new instance of decoder
      Throws:
      IOException
    • createEncoder

      MasterProcessChannelEncoder createEncoder(@Nonnull ForkNodeArguments forkingArguments) throws IOException
      Encoder factory method.
      Parameters:
      forkingArguments - forking arguments
      Returns:
      a new instance of encoder
      Throws:
      IOException