Package org.opensearch.core.xcontent
Interface ToXContent
- All Known Subinterfaces:
BytesReference,ReportingService.Info,ToXContentFragment,ToXContentObject
- All Known Implementing Classes:
AbstractBytesReference,AllCircuitBreakerStats,BytesArray,ByteSizeValue,CircuitBreakerStats,CircuitBreakingException,CompositeBytesReference,DefaultShardOperationFailedException,Index,IndexShardSnapshotException,IndexShardSnapshotFailedException,LegacyESVersion,NotSerializableExceptionWrapper,OpenSearchException,OpenSearchParseException,PagedBytesReference,ParsingException,SemverRange,ShardId,ShardOperationFailedException,TaskCancelledException,TaskResourceInfo,TaskResourceStats,TaskResourceUsage,TaskThreadUsage,Text,TransportAddress,Version
@PublicApi(since="1.0.0")
public interface ToXContent
An interface allowing to transfer an object to "XContent" using an
XContentBuilder.
The output may or may not be a value object. Objects implementing ToXContentObject output a valid value
but those that don't may or may not require emitting a startObject and an endObject.- Opensearch.api:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDelegates mapped parameters to base Params classstatic classMapped parameter base classstatic interfaceBase parameters class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleantoXContent(XContentBuilder builder, ToXContent.Params params)
-
Field Details
-
EMPTY_PARAMS
-
-
Method Details
-
toXContent
- Throws:
IOException
-
isFragment
default boolean isFragment()
-