Package org.apache.solr.api
Class Api
- java.lang.Object
-
- org.apache.solr.api.Api
-
- All Implemented Interfaces:
SpecProvider
- Direct Known Subclasses:
ApiBag.IntrospectApi
,ApiBag.LazyLoadedApi
,ApiBag.ReqHandlerToApi
,V2HttpCall.CompositeApi
public abstract class Api extends Object implements SpecProvider
Every version 2 API must extend the this class. It's mostly like a request handler but it has extra methods to provide the json schema of the end point
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,JsonSchemaValidator>
commandSchema
protected SpecProvider
spec
-
Constructor Summary
Constructors Modifier Constructor Description protected
Api(SpecProvider spec)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
call(SolrQueryRequest req, SolrQueryResponse rsp)
The method that gets called for each requestMap<String,JsonSchemaValidator>
getCommandSchema()
This method helps to cache the schema validator objectValidatingJsonMap
getSpec()
Get the specification of the API as a Map
-
-
-
Field Detail
-
spec
protected SpecProvider spec
-
commandSchema
protected volatile Map<String,JsonSchemaValidator> commandSchema
-
-
Constructor Detail
-
Api
protected Api(SpecProvider spec)
-
-
Method Detail
-
getCommandSchema
public Map<String,JsonSchemaValidator> getCommandSchema()
This method helps to cache the schema validator object
-
call
public abstract void call(SolrQueryRequest req, SolrQueryResponse rsp)
The method that gets called for each request
-
getSpec
public ValidatingJsonMap getSpec()
Get the specification of the API as a Map- Specified by:
getSpec
in interfaceSpecProvider
-
-