public class ServiceRepository extends LifecycleAdapter implements FrameworkExt
| Constructor and Description |
|---|
ServiceRepository() |
initialize, startequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, startpublic static final String NAME
public 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 in interface Lifecycledestroy in class LifecycleAdapterIllegalStateExceptionCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.