Package dev.runabout

Class RunaboutServiceBuilder


  • public class RunaboutServiceBuilder
    extends java.lang.Object
    A builder for creating a RunaboutService.
    • Constructor Detail

      • RunaboutServiceBuilder

        public RunaboutServiceBuilder​(java.lang.String projectName)
        Creates a new RunaboutServiceBuilder with the given JSON object factory. The supplier should create new instances of JSON objects.
        Parameters:
        projectName - The name of the project to log scenario under.
    • Method Detail

      • setMethodResolver

        public RunaboutServiceBuilder setMethodResolver​(MethodResolver methodResolver)
        Sets the caller supplier for the RunaboutService. The supplier should return the desired method for Runabout replay debugging from the stack a runtime. By default, the RunaboutService will use MethodResolverImpl.
        Parameters:
        methodResolver - A supplier that returns the desired Method to include in the Runabout JSON.
        Returns:
        The RunaboutServiceBuilder.
      • setCustomSerializer

        public RunaboutServiceBuilder setCustomSerializer​(RunaboutSerializer customSerializer)
        Sets the custom serializer for the RunaboutService. The serializer is used to serialize objects that do not have an instance serializer method. This serializer instance is not the default serializer, but a custom one. By default, the serializer the first instance of the RunaboutSerializer service discovered via the ServiceLoader.
        Parameters:
        customSerializer - The custom serializer to use.
        Returns:
        The RunaboutServiceBuilder.
      • setListener

        public RunaboutServiceBuilder setListener​(RunaboutListener listener)
        Sets the listener to invoke on errors.
        Parameters:
        listener - RunaboutListener instance.
        Returns:
        The RunaboutServiceBuilder instance.
      • build

        public RunaboutService build()
        Builds the RunaboutService.
        Returns:
        The RunaboutService.