com.alibaba.dubbo.rpc.protocol
Class AbstractInvoker<T>

java.lang.Object
  extended by com.alibaba.dubbo.rpc.protocol.AbstractInvoker<T>
All Implemented Interfaces:
Node, Invoker<T>
Direct Known Subclasses:
DubboInvoker, ThriftInvoker

public abstract class AbstractInvoker<T>
extends Object
implements Invoker<T>

AbstractInvoker.

Author:
qian.lei, william.liangf

Constructor Summary
AbstractInvoker(Class<T> type, URL url)
           
AbstractInvoker(Class<T> type, URL url, Map<String,String> attachment)
           
AbstractInvoker(Class<T> type, URL url, String[] keys)
           
 
Method Summary
 void destroy()
          destroy.
 Class<T> getInterface()
          get service interface.
 URL getUrl()
          get url.
 Result invoke(Invocation inv)
          invoke.
 boolean isAvailable()
          is available.
 boolean isDestroyed()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractInvoker

public AbstractInvoker(Class<T> type,
                       URL url)

AbstractInvoker

public AbstractInvoker(Class<T> type,
                       URL url,
                       String[] keys)

AbstractInvoker

public AbstractInvoker(Class<T> type,
                       URL url,
                       Map<String,String> attachment)
Method Detail

getInterface

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

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

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

isDestroyed

public boolean isDestroyed()

toString

public String toString()
Overrides:
toString in class Object

invoke

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

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


Copyright © 2012–2017 Alibaba. All rights reserved.