public abstract class AbstractContextCall extends Object implements ContextCall
ContextCall
interface, defines base behaviour.Constructor and Description |
---|
AbstractContextCall() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
callTargetMethod(String callId,
Class<?> targetType,
String methodName)
Calls target method of the service by specific protocol.
|
<T> T |
makeCall(Class<?> targetType,
String methodName,
Class<T> responseType,
Object... methodArgs)
Makes call to method of service in sibling (Spring) context.
|
@Nullable public <T> T makeCall(Class<?> targetType, String methodName, Class<T> responseType, Object... methodArgs)
ContextCall
makeCall
in interface ContextCall
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)protected abstract void callTargetMethod(String callId, Class<?> targetType, String methodName)
callId
- the unique call IDtargetType
- the class of target servicemethodName
- the name of calling method on target serviceIllegalStateException
- when error occurs during calling target methodCopyright © 2018 Pivotal Software, Inc.. All rights reserved.