java - Best Design Pattern for HttpRequestDispatcher? -


An HTTP request is the best design pattern to use for dispatch, which is an output to "GET" or "POST" Returns the stream, parses the production stream, and then displays the results parsed on the interface?

Currently, I have an HttpRequestDispatcher.java in which a UI class is defined in its constructor, and the run () method in threaded, the result sent to UIClass.request responsive or UIClass.requestFail Goes where the stream is parsed and the results are displayed.

With this problem I actually have interface, parser, and dispatcher. In this way, in the future, I can really re-use the dispatcher with many other classes ... Right now, I have to be an HttpRequestDispatcher for every "screen" ...

Any advice Appreciate, thank you!

Firstly you should send the object already parsed to the scene. Your idea should not be control over parsing content / logic.

Now the flow should go something like this,

Pars -> Dispatch -> Current

Here I think that you can enter your Sender , you want to make it a single little thing and create a parser factory. Then your sender needs parasers based on some parameters, and it should also be set to post the appropriate view set item.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -