类 InjvmProtocol
- java.lang.Object
-
- org.apache.dubbo.rpc.protocol.AbstractProtocol
-
- org.apache.dubbo.rpc.protocol.injvm.InjvmProtocol
-
- 所有已实现的接口:
Protocol
public class InjvmProtocol extends AbstractProtocol implements Protocol
InjvmProtocol
-
-
字段概要
字段 修饰符和类型 字段 说明 static intDEFAULT_PORTstatic StringNAME
-
构造器概要
构造器 构造器 说明 InjvmProtocol()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 <T> Exporter<T>export(Invoker<T> invoker)Export service for remote invocation:
1.intgetDefaultPort()Get default port when user doesn't config the port.static InjvmProtocolgetInjvmProtocol()booleanisInjvmRefer(URL url)<T> Invoker<T>protocolBindingRefer(Class<T> serviceType, URL url)-
从类继承的方法 org.apache.dubbo.rpc.protocol.AbstractProtocol
destroy, getExporterMap, getExporters, getServers, refer
-
从接口继承的方法 org.apache.dubbo.rpc.Protocol
destroy, getServers, refer
-
-
-
-
方法详细资料
-
getInjvmProtocol
public static InjvmProtocol getInjvmProtocol()
-
getDefaultPort
public int getDefaultPort()
从接口复制的说明:ProtocolGet default port when user doesn't config the port.- 指定者:
getDefaultPort在接口中Protocol- 返回:
- default port
-
export
public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException
从接口复制的说明:ProtocolExport service for remote invocation:
1. Protocol should record request source address after receive a request: RpcContext.getContext().setRemoteAddress();
2. export() must be idempotent, that is, there's no difference between invoking once and invoking twice when export the same URL
3. Invoker instance is passed in by the framework, protocol needs not to care- 指定者:
export在接口中Protocol- 类型参数:
T- Service type- 参数:
invoker- Service invoker- 返回:
- exporter reference for exported service, useful for unexport the service later
- 抛出:
RpcException- thrown when error occurs during export the service, for example: port is occupied
-
protocolBindingRefer
public <T> Invoker<T> protocolBindingRefer(Class<T> serviceType, URL url) throws RpcException
- 抛出:
RpcException
-
isInjvmRefer
public boolean isInjvmRefer(URL url)
-
-