Package dev.runabout
Class RunaboutServiceBuilder
- java.lang.Object
-
- dev.runabout.RunaboutServiceBuilder
-
public class RunaboutServiceBuilder extends java.lang.ObjectA builder for creating a RunaboutService.
-
-
Constructor Summary
Constructors Constructor Description RunaboutServiceBuilder(java.lang.String projectName)Creates a new RunaboutServiceBuilder with the given JSON object factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RunaboutServicebuild()Builds the RunaboutService.RunaboutServiceBuildersetCustomSerializer(RunaboutSerializer customSerializer)Sets the custom serializer for the RunaboutService.RunaboutServiceBuildersetListener(RunaboutListener listener)Sets the listener to invoke on errors.RunaboutServiceBuildersetMethodResolver(MethodResolver methodResolver)Sets the caller supplier for the RunaboutService.RunaboutServiceBuildersetRunaboutApi(RunaboutApi runaboutApi)
-
-
-
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
-
setRunaboutApi
public RunaboutServiceBuilder setRunaboutApi(RunaboutApi runaboutApi)
-
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, theRunaboutServicewill useMethodResolverImpl.- Parameters:
methodResolver- A supplier that returns the desiredMethodto 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 theRunaboutSerializerservice 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.
-
-