Package io.vertx.reactivex.json.schema
Class SchemaRouter
- java.lang.Object
-
- io.vertx.reactivex.json.schema.SchemaRouter
-
public class SchemaRouter extends Object
Represents a pool where parsed schemas are addressed and cached.
It also contains a cache of including on top or inner level some json schemas that could eventually parsed later.
You should not share this object between different threads
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<SchemaRouter>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description SchemaRouter(SchemaRouter delegate)
SchemaRouter(Object delegate)
-
Method Summary
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<SchemaRouter> __TYPE_ARG
-
-
Constructor Detail
-
SchemaRouter
public SchemaRouter(SchemaRouter delegate)
-
SchemaRouter
public SchemaRouter(Object delegate)
-
-
Method Detail
-
getDelegate
public SchemaRouter getDelegate()
-
resolveCachedSchema
@Deprecated public Schema resolveCachedSchema(JsonPointer refPointer, JsonPointer schemaScope, SchemaParser parser)
Deprecated.Resolve cached schema based on refPointer. If a schema isn't cached, it returns null- Parameters:
refPointer
-schemaScope
-parser
-- Returns:
- the resolved schema, or null if no schema was found
-
resolveRef
@Deprecated public void resolveRef(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser, Handler<AsyncResult<Schema>> handler)
Deprecated.LikeresolveRef(io.vertx.reactivex.core.json.pointer.JsonPointer, io.vertx.reactivex.core.json.pointer.JsonPointer, io.vertx.reactivex.json.schema.SchemaParser, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.json.schema.Schema>>)
but with a direct callback.- Parameters:
pointer
-scope
-schemaParser
-handler
-
-
resolveRef
@Deprecated public void resolveRef(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)
Deprecated.LikeresolveRef(io.vertx.reactivex.core.json.pointer.JsonPointer, io.vertx.reactivex.core.json.pointer.JsonPointer, io.vertx.reactivex.json.schema.SchemaParser, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.json.schema.Schema>>)
but with a direct callback.- Parameters:
pointer
-scope
-schemaParser
-
-
rxResolveRef
@Deprecated public io.reactivex.Single<Schema> rxResolveRef(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)
Deprecated.LikeresolveRef(io.vertx.reactivex.core.json.pointer.JsonPointer, io.vertx.reactivex.core.json.pointer.JsonPointer, io.vertx.reactivex.json.schema.SchemaParser, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.json.schema.Schema>>)
but with a direct callback.- Parameters:
pointer
-scope
-schemaParser
-- Returns:
-
addSchemaWithScope
@Deprecated public SchemaRouter addSchemaWithScope(Schema schema, JsonPointer scope)
Deprecated.Add a parsed schema to this router. When a schema is added to the cache, a new entry is created for the provided scope, but NOT forSchema.getScope()
. This may be useful to register links to singleton schemas. This method is automatically called bySchemaParser
when a new schema is parsed- Parameters:
schema
- schema to addscope
-- Returns:
- a reference to this
-
addSchemaAlias
@Deprecated public SchemaRouter addSchemaAlias(Schema schema, String alias)
Deprecated.Add an alias to a schema already registered in this router (this alias can be solved only from schema scope).- Parameters:
schema
- schema to addalias
- the schema alias- Returns:
- a reference to this
-
addJson
@Deprecated public SchemaRouter addJson(String uri, JsonObject object)
Deprecated.Add one or more json documents including schemas on top or inner levels. This method doesn't trigger the schema parsing
You can use this schema if you have externally loaded some json document and you want to register to the schema router. You can later parse and retrieve a schema from this json structure using , providing the correct
refPointer
- Parameters:
uri
-object
-- Returns:
- a reference to this
-
registeredSchemas
@Deprecated public List<Schema> registeredSchemas()
Deprecated.- Returns:
- a list of all registered schemas
-
create
@Deprecated public static SchemaRouter create(Vertx vertx, SchemaRouterOptions schemaRouterOptions)
Deprecated.Create a newSchemaRouter
- Parameters:
vertx
-schemaRouterOptions
-- Returns:
-
create
@Deprecated public static SchemaRouter create(Vertx vertx, HttpClient client, FileSystem fs, SchemaRouterOptions schemaRouterOptions)
Deprecated.Create a newSchemaRouter
- Parameters:
vertx
-client
-fs
-schemaRouterOptions
-- Returns:
-
addSchema
@Deprecated public SchemaRouter addSchema(Schema schema, JsonPointer[] aliasScopes)
Deprecated.Add a parsed schema to this router. When a schema is added to the cache, a new entry is created forSchema.getScope()
and, if you provide additional aliasScopes, this method register links to this schema with these scopes. This method is automatically called bySchemaParser
when a new schema is parsed- Parameters:
schema
- schema to addaliasScopes
-- Returns:
- a reference to this
-
addJson
@Deprecated public SchemaRouter addJson(URI uri, JsonObject object)
Deprecated.Add one or more json documents including schemas on top or inner levels. This method doesn't trigger the schema parsing
You can use this schema if you have externally loaded some json document and you want to register to the schema router. You can later parse and retrieve a schema from this json structure using , providing the correct
refPointer
- Parameters:
uri
-object
-- Returns:
- a reference to this
-
newInstance
public static SchemaRouter newInstance(SchemaRouter arg)
-
-