Reputation: 6271
I am new to java.I need to develop a proxy server for IBC 2011 conference.I have some Questions regrading the Proxy server.
1.I am going to develop the proxy server using java.
Suppose A(sending the information) to B(receive the message) through the proxy server.
Here A is sending the information through HTTP serves(application running in A is a wed application) how can i receive the information send by A in proxy server and how can I forward it to the B which is also a HTTP serves.
2.What r the Things I have to now before I start developing the proxy server.
3.How can i get the information from the HTTP protocol.
4.How can i check frequently for the any message is there in line to forward to B from A or B to A.
Can any one helpme.Thanks in advance.
Upvotes: 1
Views: 5440
Reputation: 156
I did something similar in my course project.
As far as i am concerned, the core knowledge u need to learn about java for this a proxy server is socket programming.
you can setup two sockets: one communicates between your proxy server and the web browser, the other communicates between your proxy server and the target server.
Also, you will need some knowledge about thread in Java, open one thread for each connection will be a efficient way.
And I assume that you already have the knowledge about those computer networking stuffs like http, tcp.etc.
Upvotes: 0
Reputation: 3080
there are many libraries which can you use.
for the A and B they can running hessian server(for listening) + client(for sending) and for the proxy server you can use JMS + hessian server + client same as for A and B. In this way you can send java objects.
But hessian is only on suggestion you can use RMI or spring remoting or maybe web services. By far which a have working hessian is the fastest and very easy to develop.
from 1 to 4 you ask how to design a application which is out of the scope and you need to do it by you self :).
Upvotes: 0
Reputation: 32437
Use one of these instead http://proxies.xhaus.com/java/. Rolling your own proxy implementation will be much harder than you think once you've taken all the intricacies of HTTP into account.
Upvotes: 1