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
getExpectedResponseType, isArray, isArrayOfExpectedType, isAssignableFrom, isGenericArrayOfExpectedType, isGenericArrayType, isGenericAssignableFrom, isIterableOfExpectedType, isParameterizedType, isParameterizedTypeOfExpectedType, isStreamOfExpectedType, isTypeVariable, isWildcardType, isWildcardTypeWithMatchingUpperBound, unwrapIfTypeFuture
clone, equals, finalize, getClass, hashCode, 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
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–2020. All rights reserved.