[
https://issues.apache.org/jira/browse/AVRO-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885732#action_12885732
]
Scott Carey commented on AVRO-544:
----------------------------------
bq. I think I like the Hadoop way best: pull start() out of the ctor and make
it a public method. That means existing client code needs to change to call
start() after the ctor, but I think it's worth it.
+1 Oops, I didn't interpret the whole thread here properly the first time
through. A new patch that did this like Hadoop does would be better than the
current one IMO.
I think we should probably avoid doing anything other than prep and
configuration in the constructor and allow users to control when the server is
started. For example it is often important to only open your ports for
requests after some prep-work is done, and it is often useful to construct the
object at a different time or place from when you start.
Exposing start(), stop() and join() like Hadoop is the way to go -- it lets
users be maximally flexible. There is a reason why the Jetty API has it like
that.
We can consider a convenience method that does both start() and join() in one
go (perhaps 'run()'?) but that is trivial and some might call it API clutter.
It saves one line of trivial code, so I'm a little dubious of the value.
Lets finish this JIRA and discuss that in another JIRA. Ken, if its important
to you to avoid typing both start() and join(), please open a different JIRA
for that.
> Allow the HttpServer to serve forever without a call to Thread.sleep()
> ----------------------------------------------------------------------
>
> Key: AVRO-544
> URL: https://issues.apache.org/jira/browse/AVRO-544
> Project: Avro
> Issue Type: New Feature
> Components: java
> Reporter: Jeff Hammerbacher
> Assignee: Jeff Hammerbacher
> Fix For: 1.4.0
>
> Attachments: AVRO-544-2.patch, AVRO-544.patch
>
>
> One way would be to expose the join() method on the HttpServer:
> http://jetty.codehaus.org/jetty/jetty-6/apidocs/org/mortbay/jetty/Server.html#join%28%29
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.