public class ServiceRepository extends LifecycleAdapter implements FrameworkExt
| 构造器和说明 |
|---|
ServiceRepository() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
Destroy the component
|
List<ServiceDescriptor> |
getAllServices() |
List<ProviderModel> |
getExportedServices() |
List<ConsumerModel> |
getReferredServices() |
ProviderModel |
lookupExportedService(String serviceKey) |
ProviderModel |
lookupExportedServiceWithoutGroup(String key) |
MethodDescriptor |
lookupMethod(String interfaceName,
String methodName) |
ConsumerModel |
lookupReferredService(String serviceKey) |
ServiceDescriptor |
lookupService(String interfaceName) |
void |
registerConsumer(String serviceKey,
ServiceDescriptor serviceDescriptor,
ReferenceConfigBase<?> rc,
Object proxy,
ServiceMetadata serviceMetadata) |
void |
registerProvider(String serviceKey,
Object serviceInstance,
ServiceDescriptor serviceModel,
ServiceConfigBase<?> serviceConfig,
ServiceMetadata serviceMetadata) |
ServiceDescriptor |
registerService(Class<?> interfaceClazz) |
ServiceDescriptor |
registerService(String path,
Class<?> interfaceClass)
See
registerService(Class)
we assume:
1. services with different interfaces are not allowed to have the same path.
2. services share the same interface but has different group/version can share the same path.
3. path's default value is the name of the interface. |
void |
reRegisterConsumer(String newServiceKey,
String serviceKey) |
void |
reRegisterProvider(String newServiceKey,
String serviceKey) |
void |
unregisterService(Class<?> interfaceClazz) |
void |
unregisterService(String path) |
initialize, startinitialize, startpublic ServiceDescriptor registerService(Class<?> interfaceClazz)
public ServiceDescriptor registerService(String path, Class<?> interfaceClass)
registerService(Class)
we assume: 1. services with different interfaces are not allowed to have the same path. 2. services share the same interface but has different group/version can share the same path. 3. path's default value is the name of the interface.
path - interfaceClass - public void unregisterService(Class<?> interfaceClazz)
public void unregisterService(String path)
public void registerConsumer(String serviceKey, ServiceDescriptor serviceDescriptor, ReferenceConfigBase<?> rc, Object proxy, ServiceMetadata serviceMetadata)
public void registerProvider(String serviceKey, Object serviceInstance, ServiceDescriptor serviceModel, ServiceConfigBase<?> serviceConfig, ServiceMetadata serviceMetadata)
public List<ServiceDescriptor> getAllServices()
public ServiceDescriptor lookupService(String interfaceName)
public MethodDescriptor lookupMethod(String interfaceName, String methodName)
public List<ProviderModel> getExportedServices()
public ProviderModel lookupExportedService(String serviceKey)
public ProviderModel lookupExportedServiceWithoutGroup(String key)
public List<ConsumerModel> getReferredServices()
public ConsumerModel lookupReferredService(String serviceKey)
public void destroy()
throws IllegalStateException
Lifecycledestroy 在接口中 Lifecycledestroy 在类中 LifecycleAdapterIllegalStateExceptionCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.