Package io.github.cfraser.graphguard
Interface Server.Plugin
-
- All Implemented Interfaces:
public interface Server.PluginServer.Plugin enables Server functionality to be augmented and/or observed.
Server.Plugin function execution is non-blocking, but occurs synchronously within Server proxy operations. Therefore, implement Server.Plugin functions judiciously, considering that long suspension time will impact Server throughput.
Server.Plugin function invocation is not thread-safe. Thus, perform any necessary synchronization in the Server.Plugin implementation.
-
-
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. Server.Pluginthen(Server.Plugin that)Run thisServer.Plugin then that.-
-
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
-
then
Server.Plugin then(Server.Plugin that)
Run
thisServer.Plugin then that.- Parameters:
that- the Server.Plugin to chain withthis- Returns:
a Server.Plugin that invokes
thisthen that
-
-
-
-