| Constructor and Description |
|---|
MockInvoker(URL url,
Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
Class<T> |
getInterface()
get service interface.
|
static Object |
getMockObject(String mockService,
Class serviceType) |
static Throwable |
getThrowable(String throwstr) |
URL |
getUrl() |
Result |
invoke(Invocation invocation)
invoke.
|
boolean |
isAvailable() |
static String |
normalizeMock(String mock)
Normalize mock string:
return => return null
fail => default
force => default
fail:throw/return foo => throw/return foo
force:throw/return foo => throw/return foo
|
static Object |
parseMockValue(String mock) |
static Object |
parseMockValue(String mock,
Type[] returnTypes) |
public static Object parseMockValue(String mock, Type[] returnTypes) throws Exception
Exceptionpublic Result invoke(Invocation invocation) throws RpcException
Invokerinvoke in interface Invoker<T>RpcExceptionpublic static String normalizeMock(String mock)
mock - mock stringpublic boolean isAvailable()
isAvailable in interface NodeCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.