|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alibaba.dubbo.rpc.protocol.AbstractProtocol
com.alibaba.dubbo.rpc.protocol.thrift.ThriftProtocol
public class ThriftProtocol
Field Summary | |
---|---|
static int |
DEFAULT_PORT
|
static String |
NAME
|
Constructor Summary | |
---|---|
ThriftProtocol()
|
Method Summary | ||
---|---|---|
void |
destroy()
释放协议: 1. |
|
|
export(Invoker<T> invoker)
暴露远程服务: 1. |
|
int |
getDefaultPort()
获取缺省端口,当用户没有配置端口时使用。 |
|
|
refer(Class<T> type,
URL url)
引用远程服务: 1. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PORT
public static final String NAME
Constructor Detail |
---|
public ThriftProtocol()
Method Detail |
---|
public int getDefaultPort()
Protocol
public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException
Protocol
T
- 服务的类型invoker
- 服务的执行体
RpcException
- 当暴露服务出错时抛出,比如端口已占用public void destroy()
Protocol
destroy
in interface Protocol
destroy
in class AbstractProtocol
public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException
Protocol
T
- 服务的类型type
- 服务的类型url
- 远程服务的URL地址
RpcException
- 当连接服务提供方失败时抛出
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |