public interface ContextCall
Example: makeCall(EndpointRegistry.class, "getEndpointURIs", Collection.class)
calls method getEndpointURIs (without parameters) in service EndpointRegistry and expects result as Collection.
Modifier and Type | Method and Description |
---|---|
<T> T |
makeCall(Class<?> targetType,
String methodName,
Class<T> responseType,
Object... methodArgs)
Makes call to method of service in sibling (Spring) context.
|
@Nullable <T> T makeCall(Class<?> targetType, String methodName, Class<T> responseType, Object... methodArgs)
T
- data type of responsetargetType
- the class of target service; there must be exactly one Spring bean of this typemethodName
- the name of calling method on target serviceresponseType
- as expected type of responsemethodArgs
- the method arguments (if any)IllegalStateException
- when error occurs during calling target methodCopyright © 2018 Pivotal Software, Inc.. All rights reserved.