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

com.yahoo.jdisc.service.AbstractServerProvider Maven / Gradle / Ivy

There is a newer version: 8.410.10
Show newest version
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.service;

import com.google.inject.Inject;
import com.yahoo.jdisc.AbstractResource;
import com.yahoo.jdisc.Request;

import java.util.Objects;

/**
 * 

This is a convenient parent class for {@link ServerProvider} with default implementations for all but the * essential {@link #start()} and {@link #close()} methods. It requires that the {@link CurrentContainer} is injected in * the constructor, since that interface is needed to dispatch {@link Request}s.

* * @author Simon Thoresen Hult */ public abstract class AbstractServerProvider extends AbstractResource implements ServerProvider { private final CurrentContainer container; @Inject protected AbstractServerProvider(CurrentContainer container) { Objects.requireNonNull(container, "container"); this.container = container; } public final CurrentContainer container() { return container; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy