Package net.viktorc.pp4j.impl
-
Interface Summary Interface Description AbstractProcessExecutor.ThrowingRunnable A functional interface for a runnable that may throw checked exceptions and errors.JavaSubmission.SerializableTask<T extends Serializable> A serializable, runnable, and callable task with a serializable return type.SimpleCommand.CommandCompletionPredicate A bi-predicate that may throwFailedCommandException
for determining when a command's execution is complete based on the executing process' output.SimpleProcessManager.ProcessStartupPredicate A bi-predicate that may throwFailedStartupException
for determining when a process is started up based on its output. -
Class Summary Class Description AbstractCommand An abstract implementation of theCommand
interface that stores all lines output to the process' standard out and standard error in response to the command.AbstractProcessExecutor An abstract implementation of theProcessExecutor
interface for starting, managing, and interacting with a process.AbstractProcessManager An abstract implementation of theProcessManager
interface that allows for the definition of the process builder instance to use to launch the processes, the duration of continuous idleness after which processes are to be terminated, and the character set to use when exchanging messages with the processes through their standard streams.AbstractSubmission<T> An abstract implementation of theSubmission
interface that allows for storing the result of the execution of the submission.JavaObjectCodec A singleton for encoding Java objects as strings and decoding strings into Java objects.JavaProcess The class whose main method is run as a separate process by the Java process pool executor.JavaProcess.Response A simple class to encapsulate the response of the Java process to a request.JavaProcessManager<T extends Runnable & Serializable> A sub-class ofAbstractProcessManager
for the management of process instances of theJavaProcess
class.JavaProcessManagerFactory<T extends Runnable & Serializable> An implementation of theProcessManagerFactory
interface for the creation ofJavaProcessManager
instances using a singleProcessBuilder
instance.JavaProcessPoolExecutor A sub-class ofProcessPoolExecutor
that implements theJavaProcessExecutorService
interface.JavaSubmission<T extends Serializable> A sub-class ofAbstractSubmission
for encapsulating a serializable task to execute in a separate Java process.ProcessOutputStore A class for capturing and storing output printed to the standard out and standard error streams of a process.ProcessPoolExecutor An implementation of theProcessExecutorService
interface for maintaining and managing a pool of process executors.SimpleCommand A simple sub-class of theAbstractCommand
class that relies on instances of a functional interface passed to its constructor to implement theAbstractCommand.isExecutionCompleted(String, boolean)
method.SimpleJavaProcessConfig A simple implementation of theJavaProcessConfig
interface for the definition of JVM options.SimpleProcessExecutor An sub-class of theAbstractProcessExecutor
class for the running and management of a process using aProcessManager
instance to allow for the execution of submissions in this process.SimpleProcessManager A simple sub-class of theAbstractProcessManager
class that relies on instances of functional interfaces passed to its constructor to implement theSimpleProcessManager.startsUpInstantly()
,AbstractProcessManager.isStartedUp(String, boolean)
,SimpleProcessManager.getInitSubmission()
, andSimpleProcessManager.getTerminationSubmission()
methods.SimpleSubmission<T> A simple sub-class of theAbstractSubmission
class that allows for the specification of the commands to execute and the result object to return. -
Enum Summary Enum Description JavaProcess.ResponseType An enum representing types of responses that the Java process can send back to the parent process. -
Exception Summary Exception Description AbstractProcessExecutor.ProcessException An exception thrown if an unexpected error occurs while running or interacting with a process.JavaProcess.InputDecodingException An exception class for when the decoding of a line printed to the Java process' standard in stream fails.JavaProcessPoolExecutor.UncheckedExecutionException An exception thrown if the execution of Java task fails is or interrupted.