You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Vincent GIRARDREYDET <vi...@thalesgroup.com> on 2010/02/02 16:22:05 UTC

Re: Behavior of HTTP BC

The HttpBridgeServlet is the servlet that gets registered in Jetty when 
the server is started. The servlet is constructed with a HttpProcessor 
(the one implemented by the HttpEndpoint beeing deployed) and _bridges_ 
the servlet requests to the HttpProcessor.

So for each HTTP endpoint you have a HttpBridgeServlet registered in 
Jetty with the mapping provided in the endpoint configuration.

Hope this helps :-)
Vincent

Jean-Baptiste Onofré a écrit :
> Hi,
>
> sorry for the late response.
>
> The "entry" point if HttpComponent: it's what ServiceMix use to deploy 
> and registry the component.
>
> The HttpComponent is a kind of endpoints container. You have the 
> endpoints hosted in the HttpEndpointType[] endpoints attribute.
> The HttpComponent class can provide some methods used by the endpoint. 
> For example, the createNewJettyClient() method is used by provider 
> endpoints.
>
> Concerning the consumer endpoints, a consumer endpoint implements 
> HttpProcessor interface. This interface especially defines a method 
> process(HttpServletRequest request, HttpServletResponse response) 
> which handle incoming HTTP request.
>
> In the HttpComponent, in the doInit() method, you can see that we 
> create a server (JettyContextManager). The component start this jetty 
> server and display the deployed services (in the displayServices).
>
> The endpoint HttpProcessor is registered in the jetty server 
> configuration and handle incoming HTTP request.
>
> To be honest, I don't know the usage of the HttpBridgeServlet :)
>
> Regards
> JB
>
> Thushara Seneviratne wrote:
>> Hi ,
>>
>> Together with my previous two questions i have noticed a Servlet with
>> HTTP-BC source codes called "HttpBridgeServlet"  how it actually 
>> deploy  on
>> Jetty ?
>>
>> I guess above Servlet  is the entry point for incoming HTTP requests ?
>>
>>
>> Thnaks
>>
>> Thushara
>>
>> On Wed, Jan 20, 2010 at 8:27 PM, Thushara Seneviratne <
>> thushara.sen@gmail.com> wrote:
>>
>>> Hi Jean,
>>>
>>> Thanks a lot for sharing  your insight that helped me lot to realize 
>>> the
>>> design. BTW still I have a small doubt
>>>
>>> 1.) AFAIK in SMX ConsumerEndpoint- process() method take care about the
>>> consumer role, in HTTP BC case once the HTTP request arrive to the 
>>> Jetty how
>>> it pass to the ConsumerEndpoint (say HTTPConsumerEndpoint) in order to
>>> process within the  it's process() method ?
>>>
>>>
>>> 2) One way to realize this is embed the Jetty on ConsumerEndpoint but I
>>> can't see any clear code listing on HTTP-BC source code that use 
>>> embedded
>>> Jetty rather i notice there are some methods that smiler to Servelt 
>>> service
>>> (...) method on ConsumerEndpoint. It's a great help if you cam 
>>> clarify how
>>> jetty to ConsumerEndpoint communication happen ?
>>>
>>>  Thanks ,
>>>
>>> On Wed, Jan 20, 2010 at 7:25 PM, Jean-Baptiste Onofré 
>>> <jb...@nanthrax.net>wrote:
>>>
>>>> Hi Thushara
>>>>
>>>> When you use a consumer endpoint (consumer or soap-consumer), the HTTP
>>>> component start a jetty to listen on the given locationURI.
>>>> Once the endpoint is started, jetty waiting for incoming HTTP/SOAP
>>>> request. The endpoint manage a concurrent stack of request to be 
>>>> able to
>>>> manage request in an asynchronous way.
>>>> Once the endpoint receives the HTTP request, it call the marshaler to
>>>> transform the HTTP request and send in the NMR.
>>>> Using a In-Out MEP, when a answer message comes from the NMR, the
>>>> cinematic is exactly the same: the marshaler transforms the normalized
>>>> message into a HTTP response. The endpoint match concurrent id of the
>>>> corresponding request and send back the message to the caller.
>>>>
>>>> I hope it helps you.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> Thushara Seneviratne wrote:
>>>>
>>>>> Hi ,
>>>>>
>>>>> I want to create some custom BCs and i tried to understand the 
>>>>> design of
>>>>> HTTP-BC. As we know we can use HTTP component to receive HTTP request
>>>>> from
>>>>> external world and publish in to the NMR , in my understanding it is
>>>>> required to have HTTP Listener / HTTP server or  something  smiler to
>>>>> achieve above .  Is there any such embedded HTTP interface 
>>>>> available with
>>>>> HTTP component  ? Can some one clarify how this happen ?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Thushara
>>>>>
>>>>>
>>
>