R- The response type which will be matched against and converted to
public class InstanceResponseType<R> extends AbstractResponseType<R>
ResponseTypeimplementation that will match with query handlers which return a single instance of the expected response type. If matching succeeds, the
ResponseType.convert(Object)function will be called, which will cast the query handler it's response to
|Constructor and Description|
|Modifier and Type||Method and Description|
Match the query handler its response
equals, getExpectedResponseType, hashCode, isArray, isArrayOfExpectedType, isAssignableFrom, isGenericArrayOfExpectedType, isGenericArrayType, isGenericAssignableFrom, isIterableOfExpectedType, isParameterizedType, isParameterizedTypeOfExpectedType, isPublisherOfExpectedType, isStreamOfExpectedType, isTypeVariable, isWildcardType, isWildcardTypeWithMatchingUpperBound, projectReactorOnClassPath, unwrapIfTypeFuture
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
@ConstructorProperties(value="expectedResponseType") public InstanceResponseType(Class<R> expectedResponseType)
InstanceResponseTypewith the given
expectedResponseTypeas the type to be matched against and to which the query response should be converted to.
expectedResponseType- the response type which is expected to be matched against and returned
public boolean matches(Type responseType)
Typewith this implementation its responseType
R. Will return true if the expected type is assignable to the response type, taking generic types into account.
responseType- the response
Typeof the query handler which is matched against
Objectinto the type
ResponseTypeinstance. Should only be called if
ResponseType.matches(Type)returns true. It is unspecified what this function does if the
Objectto convert into
Classrepresenting the type of the payload to be contained in the response message.
Classrepresenting the type of the payload to be contained in the response message
Copyright © 2010–2023. All rights reserved.