Querygatway, invoking query method with generic interface type as response

my query handler looks like this:

@QueryHandler
public List<SomeInterface<AnotherInterface>> getData(SomeQuery query)

how should i invoke query mehtod using Querygateway?
i have tried this aproach:

queryGateway.query(new SomeQuery(), Collections.emptyList<SomeNestedType>().class)

but i get exception: no handler found with response type [InstanceResponseType{class java.util.Collections$EmptyList}]

Hi @rsobies,

It should be doable using the ReponseTypes#multipleInstancesOf(Class).
You can check on our ref-guide more about it.

Something like this or around it:

queryGateway.query(new SomeQuery(), ResponseTypes.multipleInstancesOf(YourClass.class));

KR,