All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.server.router.configuration.builder.RestRouterBuilder Maven / Gradle / Ivy

The newest version!
package org.infinispan.server.router.configuration.builder;

import org.infinispan.server.router.configuration.RestRouterConfiguration;
import org.infinispan.server.router.logging.Log;

/**
 * Configuration builder for REST.
 *
 * @author Sebastian Łaskawiec
 */
public class RestRouterBuilder extends AbstractRouterBuilder {

    /**
     * Creates new {@link RestRouterConfiguration}.
     *
     * @param parent Parent {@link ConfigurationBuilderParent}.
     */
    public RestRouterBuilder(ConfigurationBuilderParent parent) {
        super(parent);
    }

    /**
     * Builds {@link RestRouterConfiguration}.
     */
    public RestRouterConfiguration build() {
        if (this.enabled) {
            try {
                validate();
            } catch (Exception e) {
                throw Log.SERVER.configurationValidationError(e);
            }
            return new RestRouterConfiguration(ip, port);
        }
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy