public class RpcServiceRegistry extends Object
| 构造器和说明 |
|---|
RpcServiceRegistry()
default constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected RpcHandler |
doCreateRpcHandler(Method method,
Object service,
ProtobufRPCService protobufPRCService)
Do create rpc handler.
|
void |
doDynamicRegisterService(String methodSignature,
Method method,
Object service,
Class<? extends ServerAttachmentHandler> cls)
Do dynamic register service.
|
void |
doDynamicRegisterService(String serviceName,
String methodName,
Method method,
Object service,
Class<? extends ServerAttachmentHandler> cls) |
void |
doDynamicRegisterService(String serviceName,
String methodName,
Method method,
Object service,
Class<? extends ServerAttachmentHandler> cls,
Class<? extends ServerAuthenticationDataHandler> authentiationDataCls)
Do dynamic register service.
|
void |
doRegisterMetaService()
Do register meta service.
|
protected void |
doRegiterService(Method method,
Object service,
ProtobufRPCService protobufPRCService)
Do regiter service.
|
Collection<RpcHandler> |
getServices()
Gets the services.
|
boolean |
isAsyncMode(String serviceName,
String methodName)
Checks if is async mode.
|
RpcHandler |
lookupService(String serviceName,
String methodName)
Lookup service.
|
void |
registerService(IDLServiceExporter serviceExporter)
Register service.
|
void |
registerService(Object target)
Register service.
|
void |
setDummyOverride(boolean dummyOverride)
Sets the if override exist allowed.
|
void |
setInterceptor(InvokerInterceptor interceptor)
Sets the interceptor.
|
void |
unRegisterAll()
Un register all.
|
void |
unRegisterDynamicService(String methodName)
remove service by service name and method name
|
void |
unRegisterDynamicService(String serviceName,
String methodName)
remove service by service name and method name
|
protected static final Logger LOGGER
public void setInterceptor(InvokerInterceptor interceptor)
interceptor - the new interceptorpublic void doRegisterMetaService()
public void unRegisterAll()
public void setDummyOverride(boolean dummyOverride)
dummyOverride - the new if override exist allowedpublic void registerService(Object target)
target - the targetprotected RpcHandler doCreateRpcHandler(Method method, Object service, ProtobufRPCService protobufPRCService)
method - the methodservice - the serviceprotobufPRCService - the protobuf prc servicepublic void doDynamicRegisterService(String methodSignature, Method method, Object service, Class<? extends ServerAttachmentHandler> cls)
methodSignature - the method signaturemethod - the methodservice - the servicecls - the clspublic void doDynamicRegisterService(String serviceName, String methodName, Method method, Object service, Class<? extends ServerAttachmentHandler> cls)
public void doDynamicRegisterService(String serviceName, String methodName, Method method, Object service, Class<? extends ServerAttachmentHandler> cls, Class<? extends ServerAuthenticationDataHandler> authentiationDataCls)
serviceName - the service namemethodName - the method namemethod - the methodservice - the servicecls - the clspublic boolean isAsyncMode(String serviceName, String methodName)
serviceName - the service namemethodName - the method nameprotected void doRegiterService(Method method, Object service, ProtobufRPCService protobufPRCService)
method - the methodservice - the serviceprotobufPRCService - the protobuf prc servicepublic RpcHandler lookupService(String serviceName, String methodName)
serviceName - the service namemethodName - the method namepublic Collection<RpcHandler> getServices()
public void registerService(IDLServiceExporter serviceExporter)
serviceExporter - the service exporterpublic void unRegisterDynamicService(String methodName)
methodName - method nameCopyright © 2022 Baidu, Inc.. All rights reserved.