public class ServerMetadataContainer extends Object
| Modifier and Type | Method and Description |
|---|---|
static ServerMetadataContainer |
current()
Get all SiLA Client Metadata from
Context.current() |
static ServerMetadataContainer |
fromHeaders(Metadata headers) |
<T extends com.google.protobuf.Message> |
get(Class<T> metadataMessageClass)
Get the received SiLA Client Metadata Protobuf message of the given type
|
public static ServerMetadataContainer fromHeaders(Metadata headers)
public static ServerMetadataContainer current()
Context.current()ServerMetadataContainer is attached to the context by
MetadataExtractingInterceptor. If the current call was not (yet) handled by this interceptor,
this method will return null.public <T extends com.google.protobuf.Message> T get(Class<T> metadataMessageClass)
T - Type of the desired SiLA Client Metadata Protobuf messagemetadataMessageClass - Protobuf message class of the desired SiLA Client Metadata
(<FeatureIdentifier>OuterClass.Metadata_<MetadataIdentifier>)null if no such metadata was receivedCopyright © 2022 SiLA Java Developers. All rights reserved.