reactor.net.NetServer Maven / Gradle / Ivy
The newest version!
package reactor.net;
import reactor.core.composable.Promise;
import javax.annotation.Nullable;
/**
* A network-aware server.
*
* @author Jon Brisbin
*/
public interface NetServer extends Iterable> {
/**
* Start and bind this {@literal NetServer} to the configured listen port.
*
* @return a {@link reactor.core.composable.Promise} that will be complete when the {@link NetServer} is started
*/
Promise start();
/**
* Start and bind this {@literal NetServer} to the configured listen port and notify the given {@link
* reactor.function.Consumer} when the bind operation is complete.
*
* @param started
* {@link java.lang.Runnable} to invoke when bind operation is complete
*
* @return {@link this}
*/
NetServer start(@Nullable Runnable started);
/**
* Shutdown this {@literal NetServer} and complete the returned {@link reactor.core.composable.Promise} when shut
* down.
*
* @return a {@link reactor.core.composable.Promise} that will be complete when the {@link NetServer} is shut down
*/
Promise shutdown();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy