Interface WriteHandler
- All Known Subinterfaces:
SecureWriteHandler
public interface WriteHandler
Note: it is recommended to extend the
SecureWriteHandler
instead of the WriteHandler
directly.
The original WriteHandler
interface did not take SecurityContext
into account. An overload was
later added so that SecurityContext could be passed along with the write request, though due to
backwards-compatibility reasons, the default implementation of the overload ignores the SecurityContext and
delegates to the original overload without the SecurityContext, effectively ignoring the SecurityContext.
SecureWriteHandler
reverses this paradigm so that the overload without SecurityContext has a default
implementation which delegates to the overload with SecurityContext by passing
SecurityContext.emptyContext()
and the overload with SecurityContext is overridden so that it remains
abstract, compelling implementations to override only the overload with SecurityContext.-
Method Summary
Modifier and TypeMethodDescriptionShould write the value to the given target, and return a quality code of success or failure.
Important: A return value of Good_WritePending means that this handler does not want to handle the write (or will not execute it, exactly) and the write should be handled by the underlying tag implementation.default QualityCode
write
(TagPath target, Object value, SecurityContext securityContext) Same aswrite(TagPath, Object)
except aSecurityContext
may be passed in case permissions need to be checked for the write request.
-
Method Details
-
write
Should write the value to the given target, and return a quality code of success or failure.
Important: A return value of Good_WritePending means that this handler does not want to handle the write (or will not execute it, exactly) and the write should be handled by the underlying tag implementation. -
write
Same aswrite(TagPath, Object)
except aSecurityContext
may be passed in case permissions need to be checked for the write request. By default, this overload delegates to the aforementioned overload, effectively ignoring the SecurityContext, for backwards-compatibility reasons.
-