public interface DiscoveryContext<T>
Modifier and Type | Method and Description |
---|---|
int |
getInstanceRefreshMs()
Return the threshold in milliseconds to consider a registration stale
|
ProviderStrategy<T> |
getProviderStrategy()
Return the provider strategy to use for
DiscoveryResource.getAny(String) |
ServiceDiscovery<T> |
getServiceDiscovery()
Return the service singleton
|
void |
marshallJson(com.fasterxml.jackson.databind.node.ObjectNode node,
String fieldName,
T payload)
Serialize your payload
|
T |
unMarshallJson(com.fasterxml.jackson.databind.JsonNode node)
Deserialize your payload
|
int getInstanceRefreshMs()
ServiceDiscovery<T> getServiceDiscovery()
void marshallJson(com.fasterxml.jackson.databind.node.ObjectNode node, String fieldName, T payload) throws Exception
node
- the node to serialize intofieldName
- field name to usepayload
- the payload value (can be null)Exception
- any errorsT unMarshallJson(com.fasterxml.jackson.databind.JsonNode node) throws Exception
node
- the node that has the payloadException
- any errorsProviderStrategy<T> getProviderStrategy()
DiscoveryResource.getAny(String)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.