public FunctionConfiguratorNoneToOne<String> resultAsString() { LOGGER.debug( "Configuring incoming request result: method: " + method + ", result object class: " + String.class); return new FunctionConfiguratorNoneToOne<>(requestHandlerManager, method, String.class); }
/** * Define a supplier to be applied * * @param supplier supplier */ public void withSupplier(Supplier<R> supplier) { withFunction(s -> supplier.get()); } }
public FunctionConfiguratorNoneToOne<Double> resultAsDouble() { LOGGER.debug( "Configuring incoming request result: method: " + method + ", result object class: " + Double.class); return new FunctionConfiguratorNoneToOne<>(requestHandlerManager, method, Double.class); }
@Inject private void configureHandler(RequestHandlerConfigurator requestHandlerConfigurator) { requestHandlerConfigurator .newConfiguration() .methodName("websocketIdService/getId") .noParams() .resultAsString() .withFunction(this::extractClientId); }
public FunctionConfiguratorNoneToOne<Boolean> resultAsBoolean() { LOGGER.debug( "Configuring incoming request result: method: " + method + ", result object class: " + Boolean.class); return new FunctionConfiguratorNoneToOne<>(requestHandlerManager, method, Boolean.class); }
public <R> FunctionConfiguratorNoneToOne<R> resultAsDto(Class<R> rClass) { checkNotNull(rClass, "Result class must not be null"); LOGGER.debug( "Configuring incoming request result: method: " + method + ", result object class: " + rClass); return new FunctionConfiguratorNoneToOne<>(requestHandlerManager, method, rClass); }