Package cs1302.tracer.guest
Class GuestHarness
java.lang.Object
cs1302.tracer.guest.GuestHarness
Resident execution harness running inside the persistent guest JVM.
The harness coordinates job execution dispatched by the tracer host,
virtualizes standard input, isolates class loading via disposable
child URLClassLoader instances, and notifies the host debugger
via breakpoint sentinel hooks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classIn-memory redirected input stream dynamically backed by string content. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AtomicLongMonotonic byte counter for guest standard error.static longBarrier snapshot of total standard error bytes at last completion.static StringHarness failure message for the current job, or null.static StringDispatch parameter: target classpath set by host debugger.static StringDispatch parameter: target main entry class name set by host debugger.static StringDispatch parameter: target standard input content set by host debugger.static final AtomicLongMonotonic byte counter for guest standard output.static longBarrier snapshot of total standard output bytes at last completion.static booleanControl flag: instructs harness event loop to terminate process. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidMain entry point for the guest JVM worker process.static voidSentinel hook invoked when a job execution completes.static voidSentinel hook invoked when the harness is idle and waiting for a job.
-
Field Details
-
nextClassPath
Dispatch parameter: target classpath set by host debugger. -
nextMainClass
Dispatch parameter: target main entry class name set by host debugger. -
nextStdin
Dispatch parameter: target standard input content set by host debugger. -
shouldTerminate
public static volatile boolean shouldTerminateControl flag: instructs harness event loop to terminate process. -
OUT_BYTES
Monotonic byte counter for guest standard output. -
ERR_BYTES
Monotonic byte counter for guest standard error. -
outBytes
public static volatile long outBytesBarrier snapshot of total standard output bytes at last completion. -
errBytes
public static volatile long errBytesBarrier snapshot of total standard error bytes at last completion. -
lastHarnessFailure
Harness failure message for the current job, or null.
-
-
Method Details
-
main
Main entry point for the guest JVM worker process.- Parameters:
args- Command-line arguments.
-
readyForJob
public static void readyForJob()Sentinel hook invoked when the harness is idle and waiting for a job. The host debugger places a breakpoint here to synchronize before dispatching. -
onJobCompleted
public static void onJobCompleted()Sentinel hook invoked when a job execution completes. The host debugger places a breakpoint here to finalize snapshots and output capture.
-