public class WebFluxLinkBuilder extends TemplateVariableAwareLinkBuilderSupport<WebFluxLinkBuilder>
Link
s.Modifier and Type | Class and Description |
---|---|
static class |
WebFluxLinkBuilder.WebFluxBuilder |
static class |
WebFluxLinkBuilder.WebFluxLink
Intermediate representation of a
Link within a reactive pipeline to easily add Affordance s from
method invocations. |
Modifier and Type | Method and Description |
---|---|
protected WebFluxLinkBuilder |
createNewInstance(org.springframework.web.util.UriComponentsBuilder builder,
List<Affordance> affordances,
TemplateVariables variables) |
protected WebFluxLinkBuilder |
getThis()
Returns the current concrete instance.
|
static WebFluxLinkBuilder.WebFluxBuilder |
linkTo(Object invocation)
Create a
WebFluxLinkBuilder by checking if the Reactor Context contains a ServerWebExchange and
using that combined with the Spring Web annotations to build a full URI. |
static WebFluxLinkBuilder.WebFluxBuilder |
linkTo(Object invocation,
org.springframework.web.server.ServerWebExchange exchange)
Create a
WebFluxLinkBuilder using an explicitly defined ServerWebExchange . |
static <T> T |
methodOn(Class<T> controller,
Object... parameters)
Wrapper for
DummyInvocationUtils.methodOn(Class, Object...) to be available in case you work with static
imports of WebFluxLinkBuilder . |
createNewInstance, toString
addAffordances, slash, slash, toUri, withFreshBuilder, withRel, withSelfRel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
withRel
public static WebFluxLinkBuilder.WebFluxBuilder linkTo(Object invocation)
WebFluxLinkBuilder
by checking if the Reactor Context contains a ServerWebExchange
and
using that combined with the Spring Web annotations to build a full URI. If there is no exchange, then fall back to
relative URIs. Usually used with methodOn(Class, Object...)
to refer to a method invocation.invocation
- must not be null.methodOn(Class, Object...)
public static WebFluxLinkBuilder.WebFluxBuilder linkTo(Object invocation, org.springframework.web.server.ServerWebExchange exchange)
WebFluxLinkBuilder
using an explicitly defined ServerWebExchange
. This is possible if your
WebFlux method includes the exchange and you want to pass it straight in.invocation
- must not be null.exchange
- must not be null.public static <T> T methodOn(Class<T> controller, Object... parameters)
DummyInvocationUtils.methodOn(Class, Object...)
to be available in case you work with static
imports of WebFluxLinkBuilder
.controller
- must not be null.parameters
- parameters to extend template variables in the type level mapping.protected WebFluxLinkBuilder createNewInstance(org.springframework.web.util.UriComponentsBuilder builder, List<Affordance> affordances, TemplateVariables variables)
createNewInstance
in class TemplateVariableAwareLinkBuilderSupport<WebFluxLinkBuilder>
protected WebFluxLinkBuilder getThis()
LinkBuilderSupport
getThis
in class LinkBuilderSupport<WebFluxLinkBuilder>
Copyright © 2012-2019–2019 Pivotal, Inc.. All rights reserved.