public class ServiceRegistry extends Object implements Service.DirectoryService, AutoCloseable
CallStep
. This service registry contains one meta-service -
the Service.DirectoryService
, which is used to list and describe registered callable services.Service.DirectoryService.Params
Service.DirectoryService<I>, Service.Exceptions, Service.ServiceCallContext, Service.ServiceFactory<I,R>, Service.Type
Modifier and Type | Field and Description |
---|---|
static ServiceRegistry |
EMPTY
Empty instance, for the
Graph interface. |
NAME
Constructor and Description |
---|
ServiceRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
checkRegisteredService(String service)
Check for non-null and registered.
|
void |
close()
Services can implement cleanup/shutdown procedures here.
|
protected String |
describe(Service.ServiceFactory service)
Provide a service description for the supplied service.
|
CloseableIterator |
execute(Service.ServiceCallContext ctx,
Map params)
Service.DirectoryService execution. |
Service |
get(String service,
boolean isStart,
Map params)
Lookup a service by name.
|
Service.ServiceFactory |
registerService(Service.ServiceFactory serviceFactory)
Register a callable service.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createService, describeParams, getName, getSupportedTypes, getType
execute, execute, getMaxBarrierSize, getRequirements, isBarrier, isStart, isStreaming
getRequirements, getRequirementsByType
public static final ServiceRegistry EMPTY
Graph
interface.public Service.ServiceFactory registerService(Service.ServiceFactory serviceFactory)
public void checkRegisteredService(String service)
public CloseableIterator execute(Service.ServiceCallContext ctx, Map params)
Service.DirectoryService
execution. List or describe the registered callable services.execute
in interface Service
execute
in interface Service.DirectoryService
protected String describe(Service.ServiceFactory service)
public void close()
Service
close
in interface AutoCloseable
close
in interface Service
close
in interface Service.DirectoryService
close
in interface Service.ServiceFactory
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.