public class SchemaRouter extends Object
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.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<SchemaRouter> |
__TYPE_ARG |
Constructor and Description |
---|
SchemaRouter(Object delegate) |
SchemaRouter(SchemaRouter delegate) |
Modifier and Type | Method and Description |
---|---|
SchemaRouter |
addJson(String uri,
JsonObject object)
Add one or more json documents including schemas on top or inner levels.
|
SchemaRouter |
addJson(URI uri,
JsonObject object)
Add one or more json documents including schemas on top or inner levels.
|
SchemaRouter |
addSchema(Schema schema,
JsonPointer[] aliasScopes)
Add a parsed schema to this router.
|
SchemaRouter |
addSchemaAlias(Schema schema,
String alias)
Add an alias to a schema already registered in this router (this alias can be solved only from schema scope).
|
SchemaRouter |
addSchemaWithScope(Schema schema,
JsonPointer scope)
Add a parsed schema to this router.
|
static SchemaRouter |
create(Vertx vertx,
HttpClient client,
FileSystem fs,
SchemaRouterOptions schemaRouterOptions)
Create a new
SchemaRouter |
static SchemaRouter |
create(Vertx vertx,
SchemaRouterOptions schemaRouterOptions)
Create a new
SchemaRouter |
boolean |
equals(Object o) |
SchemaRouter |
getDelegate() |
int |
hashCode() |
static SchemaRouter |
newInstance(SchemaRouter arg) |
List<Schema> |
registeredSchemas() |
Schema |
resolveCachedSchema(JsonPointer refPointer,
JsonPointer schemaScope,
SchemaParser parser)
Resolve cached schema based on refPointer.
|
void |
resolveRef(JsonPointer pointer,
JsonPointer scope,
SchemaParser schemaParser)
|
void |
resolveRef(JsonPointer pointer,
JsonPointer scope,
SchemaParser schemaParser,
Handler<AsyncResult<Schema>> handler)
|
Single<Schema> |
rxResolveRef(JsonPointer pointer,
JsonPointer scope,
SchemaParser schemaParser)
|
String |
toString() |
public static final io.vertx.lang.rx.TypeArg<SchemaRouter> __TYPE_ARG
public SchemaRouter(SchemaRouter delegate)
public SchemaRouter(Object delegate)
public SchemaRouter getDelegate()
public Schema resolveCachedSchema(JsonPointer refPointer, JsonPointer schemaScope, SchemaParser parser)
refPointer
- schemaScope
- parser
- public void resolveRef(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser, Handler<AsyncResult<Schema>> handler)
resolveRef(io.vertx.rxjava.core.json.pointer.JsonPointer, io.vertx.rxjava.core.json.pointer.JsonPointer, io.vertx.rxjava.json.schema.SchemaParser, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.json.schema.Schema>>)
but with a direct callback.pointer
- scope
- schemaParser
- handler
- public void resolveRef(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)
resolveRef(io.vertx.rxjava.core.json.pointer.JsonPointer, io.vertx.rxjava.core.json.pointer.JsonPointer, io.vertx.rxjava.json.schema.SchemaParser, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.json.schema.Schema>>)
but with a direct callback.pointer
- scope
- schemaParser
- public Single<Schema> rxResolveRef(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)
resolveRef(io.vertx.rxjava.core.json.pointer.JsonPointer, io.vertx.rxjava.core.json.pointer.JsonPointer, io.vertx.rxjava.json.schema.SchemaParser, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.json.schema.Schema>>)
but with a direct callback.pointer
- scope
- schemaParser
- public SchemaRouter addSchemaWithScope(Schema schema, JsonPointer scope)
Schema.getScope()
. This may be useful to register links to singleton schemas.
This method is automatically called by SchemaParser
when a new schema is parsedschema
- schema to addscope
- public SchemaRouter addSchemaAlias(Schema schema, String alias)
schema
- schema to addalias
- the schema aliaspublic SchemaRouter addJson(String uri, JsonObject object)
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
uri
- object
- public static SchemaRouter create(Vertx vertx, SchemaRouterOptions schemaRouterOptions)
SchemaRouter
vertx
- schemaRouterOptions
- public static SchemaRouter create(Vertx vertx, HttpClient client, FileSystem fs, SchemaRouterOptions schemaRouterOptions)
SchemaRouter
vertx
- client
- fs
- schemaRouterOptions
- public SchemaRouter addSchema(Schema schema, JsonPointer[] aliasScopes)
Schema.getScope()
and,
if you provide additional aliasScopes, this method register links to this schema with these scopes.
This method is automatically called by SchemaParser
when a new schema is parsedschema
- schema to addaliasScopes
- public SchemaRouter addJson(URI uri, JsonObject object)
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
uri
- object
- public static SchemaRouter newInstance(SchemaRouter arg)
Copyright © 2022 Eclipse. All rights reserved.