Skip to content

Commit

Permalink
Merge pull request #1106 from eclipse-passage/1101
Browse files Browse the repository at this point in the history
1101 FLS cannot define server bind address
  • Loading branch information
eparovyshnaya authored Jun 29, 2022
2 parents 841a344 + 041a8f3 commit ed23912
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,21 @@ public void restart() {
start();
}

// TODO: l10n
public void state() {
try {
String listen = this.listen.get().orElse("-"); //$NON-NLS-1$
String port = this.port.get().map(i -> i.toString()).orElse("-"); //$NON-NLS-1$
System.out.println(server.state() + " listen on " + listen + " on port " + port); //$NON-NLS-1$ //$NON-NLS-2$
System.out.println(server.state() + " on " + where()); //$NON-NLS-1$
} catch (JettyException e) {
log.error("failed to report state of Jetty server", e); //$NON-NLS-1$
}
}

private String where() {
return listen.get().orElse("-") //$NON-NLS-1$
+ ":" //$NON-NLS-1$
+ this.port.get().map(i -> i.toString()).orElse("-"); //$NON-NLS-1$
}

public ServerHandles(Scope scope, String[] names, JettyServer server, BindAddress listen, Port port) {
super(scope, names);
this.server = server;
Expand Down

0 comments on commit ed23912

Please sign in to comment.