use of org.apache.camel.impl.SynchronousDelegateProducer in project camel by apache.
the class JettyHttpEndpoint method createProducer.
@Override
public Producer createProducer() throws Exception {
JettyHttpProducer answer = new JettyHttpProducer(this);
if (httpClient != null) {
// use shared client, and ensure its started so we can use it
httpClient.start();
answer.setSharedClient(httpClient);
answer.setBinding(getJettyBinding(httpClient));
} else {
HttpClient httpClient = createJettyHttpClient();
answer.setClient(httpClient);
answer.setBinding(getJettyBinding(httpClient));
}
if (isSynchronous()) {
return new SynchronousDelegateProducer(answer);
} else {
return answer;
}
}
Aggregations