A sandoxed thread in Java