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 ServiceRegistry
EMPTY
Empty instance, for theGraph
interface.-
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 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.-
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 theGraph
interface.
-
-
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.DirectoryService
execution. List or describe the registered callable services.- Specified by:
execute
in interfaceService
- Specified by:
execute
in 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:Service
Services can implement cleanup/shutdown procedures here.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceService
- Specified by:
close
in interfaceService.DirectoryService
- Specified by:
close
in interfaceService.ServiceFactory
-
-