Class DecoratedQueryMapEncoder
java.lang.Object
io.microsphere.spring.cloud.openfeign.components.DecoratedFeignComponent<feign.QueryMapEncoder>
io.microsphere.spring.cloud.openfeign.components.DecoratedQueryMapEncoder
- All Implemented Interfaces:
feign.QueryMapEncoder,Refreshable
public class DecoratedQueryMapEncoder
extends DecoratedFeignComponent<feign.QueryMapEncoder>
implements feign.QueryMapEncoder
-
Nested Class Summary
Nested classes/interfaces inherited from interface feign.QueryMapEncoder
feign.QueryMapEncoder.Default -
Field Summary
Fields inherited from class io.microsphere.spring.cloud.openfeign.components.DecoratedFeignComponent
delegate, logger -
Constructor Summary
ConstructorsConstructorDescriptionDecoratedQueryMapEncoder(String contextId, org.springframework.cloud.context.named.NamedContextFactory<org.springframework.cloud.openfeign.FeignClientSpecification> contextFactory, org.springframework.cloud.openfeign.FeignClientProperties clientProperties, feign.QueryMapEncoder delegate) Constructs aDecoratedQueryMapEncoderwrapping the givenQueryMapEncoderdelegate. -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<? extends feign.QueryMapEncoder>Returns the configuredQueryMapEncoderclass fromFeignClientProperties.FeignClientConfiguration, falling back toPageableSpringQueryMapEncoderif not configured.Encodes the given object into a query parameter map by delegating to the underlyingQueryMapEncoder.Methods inherited from class io.microsphere.spring.cloud.openfeign.components.DecoratedFeignComponent
contextId, delegate, equals, get, getCurrentConfiguration, getDefaultConfiguration, hashCode, instantiate, loadInstance, loadInstanceFromContextFactory, refresh, toString
-
Constructor Details
-
DecoratedQueryMapEncoder
public DecoratedQueryMapEncoder(String contextId, org.springframework.cloud.context.named.NamedContextFactory<org.springframework.cloud.openfeign.FeignClientSpecification> contextFactory, org.springframework.cloud.openfeign.FeignClientProperties clientProperties, feign.QueryMapEncoder delegate) Constructs aDecoratedQueryMapEncoderwrapping the givenQueryMapEncoderdelegate.Example Usage:
DecoratedQueryMapEncoder encoder = new DecoratedQueryMapEncoder( "my-client", contextFactory, clientProperties, new QueryMapEncoder.Default());- Parameters:
contextId- the Feign client context IDcontextFactory- theNamedContextFactoryfor resolving per-client contextsclientProperties- theFeignClientPropertiesfor configuration lookupdelegate- the originalQueryMapEncoderto delegate to
-
-
Method Details
-
componentType
Returns the configuredQueryMapEncoderclass fromFeignClientProperties.FeignClientConfiguration, falling back toPageableSpringQueryMapEncoderif not configured.Example Usage:
Class<? extends QueryMapEncoder> type = decoratedQueryMapEncoder.componentType();- Specified by:
componentTypein classDecoratedFeignComponent<feign.QueryMapEncoder>- Returns:
- the
QueryMapEncodercomponent type class
-
encode
Encodes the given object into a query parameter map by delegating to the underlyingQueryMapEncoder.Example Usage:
Map<String, Object> queryParams = decoratedQueryMapEncoder.encode(myQueryObject);- Specified by:
encodein interfacefeign.QueryMapEncoder- Parameters:
object- the object to encode as query parameters- Returns:
- a map of query parameter names to values
-