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

com.github.dreamhead.moco.bootstrap.ShutdownPortOption Maven / Gradle / Ivy

Go to download

Moco is an easy setup stub framework, mainly focusing on testing and integration.

There is a newer version: 1.5.0
Show newest version
package com.github.dreamhead.moco.bootstrap;

import org.apache.commons.cli.Option;

import java.util.Optional;

public abstract class ShutdownPortOption {
    private final Integer shutdownPort;

    protected ShutdownPortOption(final Integer shutdownPort) {
        this.shutdownPort = shutdownPort;
    }

    public final Optional getShutdownPort() {
        return Optional.ofNullable(shutdownPort);
    }

    public static Option shutdownPortOption() {
        Option opt = new Option("s", true, "shutdown port");
        opt.setType(String.class);
        opt.setRequired(false);
        return opt;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy