Class Schema.Validator
-
- All Implemented Interfaces:
-
io.github.cfraser.graphguard.Server.Plugin
public final class Schema.Validator implements Server.Plugin
Schema.Validator is a Server.Plugin that validates the Bolt.Run.query and Bolt.Run.parameters in a Bolt.Run message. If the data in the Bolt.Message is invalid, according to the Schema, then a Bolt.Failure and Bolt.Ignored is returned.
-
-
Constructor Summary
Constructors Constructor Description Schema.Validator(Long cacheSize)Schema.Validator()
-
Method Summary
Modifier and Type Method Description Bolt.Messageintercept(Bolt.Message message)Intercept, and optionally transform, the message. Unitobserve(Server.Event event)Observe the event. -
-
Constructor Detail
-
Schema.Validator
Schema.Validator(Long cacheSize)
- Parameters:
cacheSize- the maximum entries in the cache of validated queries
-
Schema.Validator
Schema.Validator()
-
-
Method Detail
-
intercept
Bolt.Message intercept(Bolt.Message message)
Intercept, and optionally transform, the message.
If the returned Bolt.Message is a Bolt.Request then it's sent to the graph server, otherwise the Bolt.Response is sent to the proxy client.
- Parameters:
message- the intercepted Bolt message- Returns:
the Bolt.Message to send
-
observe
Unit observe(Server.Event event)
Observe the event.
- Parameters:
event- the Server.Event that occurred
-
-
-
-