[
https://issues.apache.org/jira/browse/HTTPCORE-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17005317#comment-17005317
]
Michael Osipov commented on HTTPCORE-620:
-----------------------------------------
Does the rank serve any purpose expect for being just there?
> Refactor int constants from org.apache.hc.core5.reactor.IOSession into an enum
> ------------------------------------------------------------------------------
>
> Key: HTTPCORE-620
> URL: https://issues.apache.org/jira/browse/HTTPCORE-620
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Components: HttpCore
> Reporter: Gary D. Gregory
> Priority: Major
>
> Refactor int constants fromĀ {{org.apache.hc.core5.reactor.IOSession}} into an
> enum called state:
> * {color:#500050}int
> org.apache.hc.core5.reactor.IO{color}{color:#500050}Session.ACTIVE{color}
> * {color:#500050}int
> org.apache.hc.core5.reactor.IO{color}{color:#500050}Session.CLOSED{color}
> * {color:#500050}int
> org.apache.hc.core5.reactor.IO{color}{color:#500050}Session.CLOSING{color}
> Like:
> {code:java}
> public interface IOSession extends ByteChannel, SocketModalCloseable,
> Identifiable {
> public enum State {
> ACTIVE(0),
> CLOSING(1),
> CLOSED(Integer.MAX_VALUE);
> private State(final int rank) {
> this.rank = rank;
> }
> public final int rank;
> }
> ...
> {code}
> PR coming...
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]