Record Class IsolationPolicy
java.lang.Object
java.lang.Record
org.j7m.middleware.api.isolation.IsolationPolicy
- Record Components:
fileSystemPolicy- filesystem policynetworkEgressPolicy- network egress policyenvironmentPolicy- environment policystdoutPolicy- stdout capture policystderrPolicy- stderr capture policy
public record IsolationPolicy(FileSystemPolicy fileSystemPolicy, NetworkEgressPolicy networkEgressPolicy, EnvironmentPolicy environmentPolicy, StdoutPolicy stdoutPolicy, StderrPolicy stderrPolicy)
extends Record
Complete policy set for an isolated execution.
The policy is immutable and thread-safe. It controls J7M-provided filesystem, network, environment, and stream-capture capabilities. It does not assert kernel-level sandboxing for arbitrary user code.
-
Constructor Summary
ConstructorsConstructorDescriptionIsolationPolicy(FileSystemPolicy fileSystemPolicy, NetworkEgressPolicy networkEgressPolicy, EnvironmentPolicy environmentPolicy, StdoutPolicy stdoutPolicy, StderrPolicy stderrPolicy) Creates a validated isolation policy. -
Method Summary
Modifier and TypeMethodDescriptionstatic IsolationPolicydefaults()Creates a conservative deny-by-default policy.Returns the value of theenvironmentPolicyrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefileSystemPolicyrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thenetworkEgressPolicyrecord component.Returns the value of thestderrPolicyrecord component.Returns the value of thestdoutPolicyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IsolationPolicy
public IsolationPolicy(FileSystemPolicy fileSystemPolicy, NetworkEgressPolicy networkEgressPolicy, EnvironmentPolicy environmentPolicy, StdoutPolicy stdoutPolicy, StderrPolicy stderrPolicy) Creates a validated isolation policy.
-
-
Method Details
-
defaults
Creates a conservative deny-by-default policy.- Returns:
- default policy
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
fileSystemPolicy
Returns the value of thefileSystemPolicyrecord component.- Returns:
- the value of the
fileSystemPolicyrecord component
-
networkEgressPolicy
Returns the value of thenetworkEgressPolicyrecord component.- Returns:
- the value of the
networkEgressPolicyrecord component
-
environmentPolicy
Returns the value of theenvironmentPolicyrecord component.- Returns:
- the value of the
environmentPolicyrecord component
-
stdoutPolicy
Returns the value of thestdoutPolicyrecord component.- Returns:
- the value of the
stdoutPolicyrecord component
-
stderrPolicy
Returns the value of thestderrPolicyrecord component.- Returns:
- the value of the
stderrPolicyrecord component
-