Class MarshaledResponseBody.SecureFile

java.lang.Object
com.soklet.MarshaledResponseBody.SecureFile
All Implemented Interfaces:
MarshaledResponseBody
Enclosing interface:
MarshaledResponseBody

@ThreadSafe public static final class MarshaledResponseBody.SecureFile extends Object implements MarshaledResponseBody
A static-file body acquired under the helper's trusted immutable-root contract. Soklet creates these descriptors for StaticFiles; an application cannot construct one directly. The opened channel is owned by the transport for the duration of delivery.

Custom transports must use openChannel(), apply getOffset() and getCount(), and close the channel after delivery or failure. A transport that cannot handle this descriptor must reject it; opening the path separately loses the helper's root and file validation.

Author:
Mark Allen