use of com.adaptris.core.http.jetty.MetadataHeaderHandler in project interlok by adaptris.
the class HttpHelper method createAndStartChannel.
public static Channel createAndStartChannel(MockMessageProducer mock, String replyPayload, HttpStatusProvider.HttpStatus status) throws Exception {
JettyMessageConsumer mc = createConsumer(URL_TO_POST_TO);
mc.setHeaderHandler(new MetadataHeaderHandler());
HttpConnection jc = createConnection();
Channel c = createChannel(jc, createWorkflow(mc, mock, new ServiceList(new Service[] { new PayloadFromTemplateService().withTemplate(replyPayload), new StandaloneProducer(new StandardResponseProducer(status)) })));
start(c);
return c;
}
use of com.adaptris.core.http.jetty.MetadataHeaderHandler in project interlok by adaptris.
the class HttpHelper method createAndStartChannel.
public static Channel createAndStartChannel(MockMessageProducer mock, HttpStatusProvider.HttpStatus status) throws Exception {
JettyMessageConsumer mc = createConsumer(URL_TO_POST_TO);
mc.setHeaderHandler(new MetadataHeaderHandler());
HttpConnection jc = createConnection();
Channel c = createChannel(jc, createWorkflow(mc, mock, new ServiceList(new Service[] { new StandaloneProducer(new StandardResponseProducer(status)) })));
start(c);
return c;
}
Aggregations