Mina - HTTP proxy - what is AbstractHttpLogicHandler for?

I am currently working on creating a simple HTTP proxy using Apache Mina, specifically org.apache.mina.proxy, and I have some questions about how to use some of the components.

  • How to extract future address from incoming HTTP request? I can see how to create a ProxyConnection based on the URL, but I don't see how to extract this from the incoming request. I have a feeling that this leads to my next question:

  • What is AbstractHttpLogicHandler? I see that it has a subclass of HttpSmartProxyHandler, but I'm not sure what and how to use it.

  • Is there an example somewhere that I could look at? I watched http://mina.apache.org/report/trunk/xref/org/apache/mina/example/proxy/ , but it does not seem to answer my questions above.

Thanks so much for any help.

+3
source share
2 answers

I think the classes in org.apache.mina.proxy are classes for adding a proxy to your HTTP request, not classes that you can directly use to create your proxy.

+1
source

About your second point: AbstractHttpLogicHandler- An abstract class that adornsAbstractProxyLogicHandler

" provides the encoding / response of the HTTP request to the decoding function" AbstractHttpLogicHandler

HttpSmartProxyHandler - , AbstractProxyLogicHandler. , HTTP- - ( handleResponse(final HttpProxyResponse response))

0

Source: https://habr.com/ru/post/1757636/


All Articles