com.baidu.jprotobuf.pbrpc.client.ha
类 HaProtobufRpcProxy<T>

java.lang.Object
  继承者 com.baidu.jprotobuf.pbrpc.client.ha.NamingServiceChangeListener
      继承者 com.baidu.jprotobuf.pbrpc.client.ha.HaProtobufRpcProxy<T>
所有已实现的接口:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
直接已知子类:
HaProtobufRpcProxyBean

public class HaProtobufRpcProxy<T>
extends NamingServiceChangeListener
implements org.aopalliance.intercept.MethodInterceptor

A enhanced ProtobufRpcProxy supports naming service and load blanace.

从以下版本开始:
2.16
作者:
xiemalin

字段摘要
protected static org.apache.commons.logging.Log LOGGER
          log this class
 
构造方法摘要
HaProtobufRpcProxy(RpcClient rpcClient, java.lang.Class<T> interfaceClass, NamingService namingService)
           
HaProtobufRpcProxy(RpcClient rpcClient, java.lang.Class<T> interfaceClass, NamingService namingService, NamingServiceLoadBalanceStrategyFactory loadBalanceStrategyFactory, FailOverInterceptor failOverInterceptor)
           
 
方法摘要
 void close()
           
 NamingService getNamingService()
           
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
           
 boolean isLookupStubOnStartup()
          get the lookupStubOnStartup
protected  ProtobufRpcProxy<T> onBuildProtobufRpcProxy(RpcClient rpcClient, java.lang.Class<T> interfaceClass)
           
 T proxy()
           
protected  void reInit(java.lang.String service, java.util.List<RegisterInfo> list)
           
 void setLookupStubOnStartup(boolean lookupStubOnStartup)
          set lookupStubOnStartup value to lookupStubOnStartup
 
从类 com.baidu.jprotobuf.pbrpc.client.ha.NamingServiceChangeListener 继承的方法
setDelay, setPeriod, startUpdateNamingServiceTask
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

LOGGER

protected static final org.apache.commons.logging.Log LOGGER
log this class

构造方法详细信息

HaProtobufRpcProxy

public HaProtobufRpcProxy(RpcClient rpcClient,
                          java.lang.Class<T> interfaceClass,
                          NamingService namingService)

HaProtobufRpcProxy

public HaProtobufRpcProxy(RpcClient rpcClient,
                          java.lang.Class<T> interfaceClass,
                          NamingService namingService,
                          NamingServiceLoadBalanceStrategyFactory loadBalanceStrategyFactory,
                          FailOverInterceptor failOverInterceptor)
方法详细信息

isLookupStubOnStartup

public boolean isLookupStubOnStartup()
get the lookupStubOnStartup

返回:
the lookupStubOnStartup

setLookupStubOnStartup

public void setLookupStubOnStartup(boolean lookupStubOnStartup)
set lookupStubOnStartup value to lookupStubOnStartup

参数:
lookupStubOnStartup - the lookupStubOnStartup to set

onBuildProtobufRpcProxy

protected ProtobufRpcProxy<T> onBuildProtobufRpcProxy(RpcClient rpcClient,
                                                      java.lang.Class<T> interfaceClass)

proxy

public T proxy()
        throws java.lang.Exception
抛出:
java.lang.Exception

close

public void close()
覆盖:
类 NamingServiceChangeListener 中的 close

getNamingService

public NamingService getNamingService()
指定者:
类 NamingServiceChangeListener 中的 getNamingService

reInit

protected void reInit(java.lang.String service,
                      java.util.List<RegisterInfo> list)
               throws java.lang.Exception
指定者:
类 NamingServiceChangeListener 中的 reInit
抛出:
java.lang.Exception

invoke

public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
                        throws java.lang.Throwable
指定者:
接口 org.aopalliance.intercept.MethodInterceptor 中的 invoke
抛出:
java.lang.Throwable


Copyright © 2015 Baidu, Inc.. All Rights Reserved.