类 MockInvoker<T>
- java.lang.Object
-
- com.alibaba.dubbo.rpc.support.MockInvoker<T>
-
-
构造器概要
构造器 构造器 说明 MockInvoker(URL url)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
destroy()
destroy.Class<T>
getInterface()
get service interface.static Object
getMockObject(String mockService, Class serviceType)
static Throwable
getThrowable(String throwstr)
URL
getUrl()
get url.Result
invoke(Invocation invocation)
invoke.boolean
isAvailable()
is available.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 foostatic Object
parseMockValue(String mock)
static Object
parseMockValue(String mock, Type[] returnTypes)
-
-
-
构造器详细资料
-
MockInvoker
public MockInvoker(URL url)
-
-
方法详细资料
-
parseMockValue
public static Object parseMockValue(String mock, Type[] returnTypes) throws Exception
- 抛出:
Exception
-
invoke
public Result invoke(Invocation invocation) throws RpcException
从接口复制的说明:Invoker
invoke.- 指定者:
invoke
在接口中Invoker<T>
- 返回:
- result
- 抛出:
RpcException
-
normalizeMock
public 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
- 参数:
mock
- mock string- 返回:
- normalized mock string
-
isAvailable
public boolean isAvailable()
从接口复制的说明:Node
is available.- 指定者:
isAvailable
在接口中Node
- 返回:
- available.
-
-