com.alibaba.dubbo.rpc.support
Class MockInvoker<T>

java.lang.Object
  extended by com.alibaba.dubbo.rpc.support.MockInvoker<T>
All Implemented Interfaces:
Node, Invoker<T>

public final class MockInvoker<T>
extends Object
implements Invoker<T>

Author:
chao.liuc, william.liangf

Constructor Summary
MockInvoker(URL url)
           
 
Method Summary
 void destroy()
          destroy.
 Class<T> getInterface()
          get service interface.
 URL getUrl()
          get url.
 Result invoke(Invocation invocation)
          invoke.
 boolean isAvailable()
          is available.
static Object parseMockValue(String mock)
           
static Object parseMockValue(String mock, Type[] returnTypes)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockInvoker

public MockInvoker(URL url)
Method Detail

parseMockValue

public static Object parseMockValue(String mock)
                             throws Exception
Throws:
Exception

parseMockValue

public static Object parseMockValue(String mock,
                                    Type[] returnTypes)
                             throws Exception
Throws:
Exception

invoke

public Result invoke(Invocation invocation)
              throws RpcException
Description copied from interface: Invoker
invoke.

Specified by:
invoke in interface Invoker<T>
Returns:
result
Throws:
RpcException

getUrl

public URL getUrl()
Description copied from interface: Node
get url.

Specified by:
getUrl in interface Node
Returns:
url.

isAvailable

public boolean isAvailable()
Description copied from interface: Node
is available.

Specified by:
isAvailable in interface Node
Returns:
available.

destroy

public void destroy()
Description copied from interface: Node
destroy.

Specified by:
destroy in interface Node

getInterface

public Class<T> getInterface()
Description copied from interface: Invoker
get service interface.

Specified by:
getInterface in interface Invoker<T>
Returns:
service interface.


Copyright © 2012–2017 Alibaba. All rights reserved.