类 MockInvoker<T>
- java.lang.Object
-
- com.alibaba.dubbo.rpc.support.MockInvoker<T>
-
-
构造器概要
构造器 构造器 说明 MockInvoker(URL url)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voiddestroy()destroy.Class<T>getInterface()get service interface.static ObjectgetMockObject(String mockService, Class serviceType)static ThrowablegetThrowable(String throwstr)URLgetUrl()get url.Resultinvoke(Invocation invocation)invoke.booleanisAvailable()is available.static StringnormalizeMock(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 ObjectparseMockValue(String mock)static ObjectparseMockValue(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
从接口复制的说明:Invokerinvoke.- 指定者:
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()
从接口复制的说明:Nodeis available.- 指定者:
isAvailable在接口中Node- 返回:
- available.
-
-