-
Notifications
You must be signed in to change notification settings - Fork 925
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
Deprecate ArmeriaSettings.ip and add ArmeriaSettings.address #4598
Changes from 1 commit
22f354e
369b08f
d4af03d
d64553c
14f2149
fef7903
641077b
1609c08
e19e1e6
f4a6785
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,7 @@ public class ArmeriaSettings { | |
public static class Port { | ||
/** | ||
* IP address to bind to. If not set, will bind to all addresses, e.g. {@code 0.0.0.0}. | ||
* | ||
* @deprecated Use {@link #address} instead. | ||
*/ | ||
@Deprecated | ||
|
@@ -114,6 +115,7 @@ public static class Port { | |
|
||
/** | ||
* Returns the IP address that the {@link Server} uses. | ||
* | ||
* @deprecated Use {@link #getAddress()} instead. | ||
*/ | ||
@Deprecated | ||
|
@@ -124,6 +126,7 @@ public String getIp() { | |
|
||
/** | ||
* Registers an IP address that the {@link Server} uses. | ||
* | ||
* @deprecated Use {@link #setAddress(InetAddress)} instead. | ||
*/ | ||
@Deprecated | ||
|
@@ -133,15 +136,15 @@ public Port setIp(String ip) { | |
} | ||
|
||
/** | ||
* Returns the Network address that the {@link Server} uses. | ||
* Returns the network address that the {@link Server} uses. | ||
*/ | ||
@Nullable | ||
public InetAddress getAddress() { | ||
return address; | ||
} | ||
|
||
/** | ||
* Registers a Network address that the {@link Server} uses. | ||
* Registers a network address that the {@link Server} uses. | ||
*/ | ||
public Port setAddress(InetAddress address) { | ||
this.address = address; | ||
|
@@ -202,6 +205,17 @@ public Port setProtocol(SessionProtocol protocol) { | |
protocols = ImmutableList.of(protocol); | ||
return this; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Port{" + | ||
"ip='" + ip + '\'' + | ||
", address=" + address + | ||
", iface='" + iface + '\'' + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: It seems like we add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used Intellij to generate and looks like it adds There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't know about it. 😄 It looks good now. Thanks! |
||
", port=" + port + | ||
", protocols=" + protocols + | ||
'}'; | ||
} | ||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a blank line between the doc and
@deprecated
. 😉