Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Introduces a new
InetServer
interface that is aStyxService
with a serverInetAddress
. It is an Internet server that accepts incoming connections on a specified port. The interface is not limited to HTTP. It can be anything as long as it opens a server port.Because
InetServer
is aStyxService
, it can be started and stopped with the usual Styx service framework.Extend the Styx configuration object model to accommodate these new
InetSerever
objects. This allows used to configure styx server objects like so:This PR doesn't yet provide any server implementations. Therefore the above configuration wouldn't work against this PR. This PR just extends the configuration framework into which new server implementations can be added.
Open Issues
The
InetServer
interface should really be calledStyxServer
. But this name is already taken, and changing it would break some existing consumers.Styx services must be converted to Guava Services before they can be started. This is really inconvenient at times (in tests only), as you need two separate objects. One for the styx service to read the port number, another for starting/stopping the service.
NettyServer service name.