Class SchemaRouter
- java.lang.Object
-
- io.vertx.mutiny.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 theoriginalnon Mutiny-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(io.vertx.json.schema.SchemaRouter delegate)SchemaRouter(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SchemaRouteraddJson(String uri, io.vertx.core.json.JsonObject object)Deprecated.SchemaRouteraddJson(URI uri, io.vertx.core.json.JsonObject object)Deprecated.SchemaRouteraddSchema(Schema schema, io.vertx.core.json.pointer.JsonPointer[] aliasScopes)Deprecated.SchemaRouteraddSchemaAlias(Schema schema, String alias)Deprecated.SchemaRouteraddSchemaWithScope(Schema schema, JsonPointer scope)Deprecated.static SchemaRoutercreate(Vertx vertx, io.vertx.json.schema.SchemaRouterOptions schemaRouterOptions)Deprecated.static SchemaRoutercreate(Vertx vertx, HttpClient client, FileSystem fs, io.vertx.json.schema.SchemaRouterOptions schemaRouterOptions)Deprecated.booleanequals(Object o)io.vertx.json.schema.SchemaRoutergetDelegate()inthashCode()static SchemaRouternewInstance(io.vertx.json.schema.SchemaRouter arg)List<Schema>registeredSchemas()Deprecated.SchemaresolveCachedSchema(JsonPointer refPointer, JsonPointer schemaScope, SchemaParser parser)Deprecated.io.smallrye.mutiny.Uni<Schema>resolveRef(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)Deprecated.SchemaresolveRefAndAwait(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)Deprecated.voidresolveRefAndForget(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)Deprecated.StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<SchemaRouter> __TYPE_ARG
-
-
Constructor Detail
-
SchemaRouter
public SchemaRouter(io.vertx.json.schema.SchemaRouter delegate)
-
SchemaRouter
public SchemaRouter(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.json.schema.SchemaRouter getDelegate()
-
resolveCachedSchema
@Deprecated public Schema resolveCachedSchema(JsonPointer refPointer, JsonPointer schemaScope, SchemaParser parser)
Deprecated.- Parameters:
refPointer-schemaScope-parser-- Returns:
- the resolved schema, or null if no schema was found
-
resolveRef
@CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<Schema> resolveRef(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)
Deprecated.LikeresolveRef(io.vertx.mutiny.core.json.pointer.JsonPointer, io.vertx.mutiny.core.json.pointer.JsonPointer, io.vertx.mutiny.json.schema.SchemaParser)but with a direct callback.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
pointer-scope-schemaParser-- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
resolveRefAndAwait
@Deprecated public Schema resolveRefAndAwait(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)
Deprecated.Blocking variant ofresolveRef(io.vertx.mutiny.core.json.pointer.JsonPointer,io.vertx.mutiny.core.json.pointer.JsonPointer,io.vertx.mutiny.json.schema.SchemaParser).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
pointer-scope-schemaParser-- Returns:
- the Schema instance produced by the operation.
-
resolveRefAndForget
@Deprecated public void resolveRefAndForget(JsonPointer pointer, JsonPointer scope, SchemaParser schemaParser)
Deprecated.Variant ofresolveRef(io.vertx.mutiny.core.json.pointer.JsonPointer,io.vertx.mutiny.core.json.pointer.JsonPointer,io.vertx.mutiny.json.schema.SchemaParser)that ignores the result of the operation.This method subscribes on the result of
resolveRef(io.vertx.mutiny.core.json.pointer.JsonPointer,io.vertx.mutiny.core.json.pointer.JsonPointer,io.vertx.mutiny.json.schema.SchemaParser), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromresolveRef(io.vertx.mutiny.core.json.pointer.JsonPointer,io.vertx.mutiny.core.json.pointer.JsonPointer,io.vertx.mutiny.json.schema.SchemaParser)but you don't need to compose it with other operations.- Parameters:
pointer-scope-schemaParser-
-
addSchemaWithScope
@Deprecated public SchemaRouter addSchemaWithScope(Schema schema, JsonPointer scope)
Deprecated.- Parameters:
schema- schema to addscope-- Returns:
- a reference to this
-
addSchemaAlias
@Deprecated public SchemaRouter addSchemaAlias(Schema schema, String alias)
Deprecated.- Parameters:
schema- schema to addalias- the schema alias- Returns:
- a reference to this
-
addJson
@Deprecated public SchemaRouter addJson(String uri, io.vertx.core.json.JsonObject object)
Deprecated.- 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, io.vertx.json.schema.SchemaRouterOptions schemaRouterOptions)
Deprecated.- Parameters:
vertx-schemaRouterOptions-- Returns:
-
create
@Deprecated public static SchemaRouter create(Vertx vertx, HttpClient client, FileSystem fs, io.vertx.json.schema.SchemaRouterOptions schemaRouterOptions)
Deprecated.- Parameters:
vertx-client-fs-schemaRouterOptions-- Returns:
-
addSchema
@Deprecated public SchemaRouter addSchema(Schema schema, io.vertx.core.json.pointer.JsonPointer[] aliasScopes)
Deprecated.- Parameters:
schema- schema to addaliasScopes-- Returns:
- a reference to this
-
addJson
@Deprecated public SchemaRouter addJson(URI uri, io.vertx.core.json.JsonObject object)
Deprecated.- Parameters:
uri-object-- Returns:
- a reference to this
-
newInstance
public static SchemaRouter newInstance(io.vertx.json.schema.SchemaRouter arg)
-
-