Class ServiceRegistry
- java.lang.Object
 - 
- org.apache.tinkerpop.gremlin.structure.service.ServiceRegistry
 
 
- 
- All Implemented Interfaces:
 AutoCloseable,Service,Service.DirectoryService,Service.ServiceFactory
- Direct Known Subclasses:
 TinkerServiceRegistry
public class ServiceRegistry extends Object implements Service.DirectoryService, AutoCloseable
A basic service registry implementation used byCallStep. This service registry contains one meta-service - theService.DirectoryService, which is used to list and describe registered callable services.- Author:
 - Mike Personick (http://github.com/mikepersonick)
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.service.Service
Service.DirectoryService<I>, Service.Exceptions, Service.ServiceCallContext, Service.ServiceFactory<I,R>, Service.Type 
- 
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.service.Service.DirectoryService
Service.DirectoryService.Params 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description static ServiceRegistryEMPTYEmpty instance, for theGraphinterface.- 
Fields inherited from interface org.apache.tinkerpop.gremlin.structure.service.Service.DirectoryService
NAME 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ServiceRegistry() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckRegisteredService(String service)Check for non-null and registered.voidclose()Services can implement cleanup/shutdown procedures here.protected Stringdescribe(Service.ServiceFactory service)Provide a service description for the supplied service.CloseableIteratorexecute(Service.ServiceCallContext ctx, Map params)Service.DirectoryServiceexecution.Serviceget(String service, boolean isStart, Map params)Lookup a service by name.Service.ServiceFactoryregisterService(Service.ServiceFactory serviceFactory)Register a callable service.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.service.Service
execute, execute, getMaxBarrierSize, getRequirements, isBarrier, isStart, isStreaming 
- 
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.service.Service.DirectoryService
createService, describeParams, getName, getSupportedTypes, getType 
- 
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.service.Service.ServiceFactory
getRequirements, getRequirementsByType 
 - 
 
 - 
 
- 
- 
Field Detail
- 
EMPTY
public static final ServiceRegistry EMPTY
Empty instance, for theGraphinterface. 
 - 
 
- 
Method Detail
- 
registerService
public Service.ServiceFactory registerService(Service.ServiceFactory serviceFactory)
Register a callable service. 
- 
checkRegisteredService
public void checkRegisteredService(String service)
Check for non-null and registered. 
- 
execute
public CloseableIterator execute(Service.ServiceCallContext ctx, Map params)
Service.DirectoryServiceexecution. List or describe the registered callable services.- Specified by:
 executein interfaceService- Specified by:
 executein interfaceService.DirectoryService
 
- 
describe
protected String describe(Service.ServiceFactory service)
Provide a service description for the supplied service. 
- 
close
public void close()
Description copied from interface:ServiceServices can implement cleanup/shutdown procedures here.- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceService- Specified by:
 closein interfaceService.DirectoryService- Specified by:
 closein interfaceService.ServiceFactory
 
 - 
 
 -