Interface UnmodifiableBean
- All Known Implementing Classes:
Accepted.Unmodifiable,Accepted.Unmodifiable,AlreadyReported.Unmodifiable,AlreadyReported.Unmodifiable,BadGateway.Unmodifiable,BadRequest.Unmodifiable,BadRequest.Unmodifiable,BasicHttpException.Unmodifiable,BasicHttpException.Unmodifiable,BasicStatusLine.Unmodifiable,ByteArrayEntity.Unmodifiable,ByteArrayResource.Unmodifiable,Conflict.Unmodifiable,Conflict.Unmodifiable,Continue.Unmodifiable,Continue.Unmodifiable,Created.Unmodifiable,Created.Unmodifiable,EarlyHints.Unmodifiable,EarlyHints.Unmodifiable,ExpectationFailed.Unmodifiable,ExpectationFailed.Unmodifiable,FailedDependency.Unmodifiable,FailedDependency.Unmodifiable,FileEntity.Unmodifiable,FileResource.Unmodifiable,Forbidden.Unmodifiable,Forbidden.Unmodifiable,Found.Unmodifiable,Found.Unmodifiable,GatewayTimeout.Unmodifiable,Gone.Unmodifiable,Gone.Unmodifiable,HeaderList.Unmodifiable,HttpHeaderList.Unmodifiable,HttpPartList.Unmodifiable,HttpVersionNotSupported.Unmodifiable,HttpVersionNotSupported.Unmodifiable,IMUsed.Unmodifiable,IMUsed.Unmodifiable,InsufficientStorage.Unmodifiable,InsufficientStorage.Unmodifiable,InternalServerError.Unmodifiable,InternalServerError.Unmodifiable,LengthRequired.Unmodifiable,LengthRequired.Unmodifiable,Locked.Unmodifiable,Locked.Unmodifiable,LoopDetected.Unmodifiable,LoopDetected.Unmodifiable,MethodNotAllowed.Unmodifiable,MethodNotAllowed.Unmodifiable,MisdirectedRequest.Unmodifiable,MisdirectedRequest.Unmodifiable,MovedPermanently.Unmodifiable,MovedPermanently.Unmodifiable,MultipleChoices.Unmodifiable,MultipleChoices.Unmodifiable,MultiStatus.Unmodifiable,MultiStatus.Unmodifiable,NetworkAuthenticationRequired.Unmodifiable,NetworkAuthenticationRequired.Unmodifiable,NoContent.Unmodifiable,NoContent.Unmodifiable,NonAuthoritativeInformation.Unmodifiable,NonAuthoritiveInformation.Unmodifiable,NotAcceptable.Unmodifiable,NotAcceptable.Unmodifiable,NotExtended.Unmodifiable,NotExtended.Unmodifiable,NotFound.Unmodifiable,NotFound.Unmodifiable,NotImplemented.Unmodifiable,NotImplemented.Unmodifiable,NotModified.Unmodifiable,NotModified.Unmodifiable,Ok.Unmodifiable,Ok.Unmodifiable,PartialContent.Unmodifiable,PartialContent.Unmodifiable,PartList.Unmodifiable,PayloadTooLarge.Unmodifiable,PayloadTooLarge.Unmodifiable,PermanentRedirect.Unmodifiable,PermanentRedirect.Unmodifiable,PreconditionFailed.Unmodifiable,PreconditionFailed.Unmodifiable,PreconditionRequired.Unmodifiable,PreconditionRequired.Unmodifiable,Processing.Unmodifiable,Processing.Unmodifiable,RangeNotSatisfiable.Unmodifiable,RangeNotSatisfiable.Unmodifiable,ReaderEntity.Unmodifiable,ReaderResource.Unmodifiable,RequestHeaderFieldsTooLarge.Unmodifiable,RequestHeaderFieldsTooLarge.Unmodifiable,ResetContent.Unmodifiable,ResetContent.Unmodifiable,SeeOther.Unmodifiable,SeeOther.Unmodifiable,SerializedEntity.Unmodifiable,ServiceUnavailable.Unmodifiable,ServiceUnavailable.Unmodifiable,StreamEntity.Unmodifiable,StreamResource.Unmodifiable,StringEntity.Unmodifiable,StringResource.Unmodifiable,SwitchingProtocols.Unmodifiable,SwitchingProtocols.Unmodifiable,TemporaryRedirect.Unmodifiable,TemporaryRedirect.Unmodifiable,TooManyRequests.Unmodifiable,TooManyRequests.Unmodifiable,Unauthorized.Unmodifiable,Unauthorized.Unmodifiable,UnavailableForLegalReasons.Unmodifiable,UnavailableForLegalReasons.Unmodifiable,UnprocessableEntity.Unmodifiable,UnprocessableEntity.Unmodifiable,UnsupportedMediaType.Unmodifiable,UnsupportedMediaType.Unmodifiable,UpgradeRequired.Unmodifiable,UpgradeRequired.Unmodifiable,UriTooLong.Unmodifiable,UriTooLong.Unmodifiable,UseProxy.Unmodifiable,UseProxy.Unmodifiable,VariantAlsoNegotiates.Unmodifiable,VariantAlsoNegotiates.Unmodifiable
Unmodifiable snapshot variants of the HTTP bean families.
Immutability across the HTTP bean hierarchies is expressed with a "funnel + nested Unmodifiable
snapshot" paradigm: every state change on a bean is routed through a single protected modify(Runnable)
choke-point, and each concrete class gets a nested X.Unmodifiable extends X whose only behavioral
override is a throwing modify(...). Because there is no single common Unmodifiable supertype
across all leaves, this empty marker gives isUnmodifiable() a single type check that works uniformly
across every family and both the canonical and classic stacks:
See Also:
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Class<?>Returns the "logical" (declared) type of the specified object, unwrapping the internalX.Unmodifiablesnapshot subclass when present.
-
Method Details
-
logicalType
Returns the "logical" (declared) type of the specified object, unwrapping the internalX.Unmodifiablesnapshot subclass when present.The nested
X.Unmodifiablesnapshot classes are an internal implementation detail of the immutability paradigm. Any code that reports or keys on a bean's runtime type over the wire (e.g. theThrownresponse header) must use the logical type so that a frozenBadRequest.Unmodifiablestill reports asBadRequest.- Parameters:
o- The object. Must not benull .- Returns:
- The declared type — the immediate superclass for an
UnmodifiableBean, otherwise the runtime class.
-