| 构造器和说明 |
|---|
MockInvoker(URL url,
Class<T> type) |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
destroyAllpublic static Object parseMockValue(String mock, Type[] returnTypes) throws Exception
Exceptionpublic Result invoke(Invocation invocation) throws RpcException
Invokerinvoke 在接口中 Invoker<T>RpcExceptionpublic static String normalizeMock(String mock)
mock - mock stringpublic boolean isAvailable()
isAvailable 在接口中 NodeCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.