Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpServer and Startable should not have default for methods that take callbacks / notify #733

Closed
RichardHightower opened this issue Jun 14, 2016 · 1 comment

Comments

@RichardHightower
Copy link
Member

public interface HttpServer extends Server, HttpTransport {

    default HttpServer startServer() {
        start();
        return this;
    }


    default HttpServer startServerAndWait() {
        throw new UnsupportedOperationException("startServerAndWait is not supported by " + this.getClass().getName());
    }
@RichardHightower
Copy link
Member Author

public interface Startable {

    default void start() {
    }

    default void startWithNotify(Runnable runnable) {
        throw new UnsupportedOperationException("start With Notice if not supported by " + this.getClass().getName());
    }
}

RichardHightower pushed a commit that referenced this issue Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant