public class ThriftProtocol extends AbstractProtocol
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT |
static String |
NAME |
| Constructor and Description |
|---|
ThriftProtocol() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy protocol:
1. |
<T> Exporter<T> |
export(Invoker<T> invoker)
Export service for remote invocation:
1. |
int |
getDefaultPort()
Get default port when user doesn't config the port.
|
<T> Invoker<T> |
refer(Class<T> type,
URL url)
Refer a remote service:
1. |
public static final int DEFAULT_PORT
public static final String NAME
public int getDefaultPort()
Protocolpublic <T> Exporter<T> export(Invoker<T> invoker) throws RpcException
ProtocolT - Service typeinvoker - Service invokerRpcException - thrown when error occurs during export the service, for example: port is occupiedpublic void destroy()
Protocoldestroy in interface Protocoldestroy in class AbstractProtocolpublic <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException
ProtocolT - Service typetype - Service classurl - URL address for the remote serviceRpcException - when there's any error while connecting to the service providerCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.