Search in sources :

Example 1 with MetadataHeaderHandler

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;
}
Also used : MetadataHeaderHandler(com.adaptris.core.http.jetty.MetadataHeaderHandler) HttpConnection(com.adaptris.core.http.jetty.HttpConnection) StandardResponseProducer(com.adaptris.core.http.jetty.StandardResponseProducer) ServiceList(com.adaptris.core.ServiceList) JettyHelper.createChannel(com.adaptris.core.http.jetty.JettyHelper.createChannel) Channel(com.adaptris.core.Channel) JettyMessageConsumer(com.adaptris.core.http.jetty.JettyMessageConsumer) PayloadFromTemplateService(com.adaptris.core.services.metadata.PayloadFromTemplateService) StandaloneProducer(com.adaptris.core.StandaloneProducer)

Example 2 with MetadataHeaderHandler

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;
}
Also used : MetadataHeaderHandler(com.adaptris.core.http.jetty.MetadataHeaderHandler) HttpConnection(com.adaptris.core.http.jetty.HttpConnection) StandardResponseProducer(com.adaptris.core.http.jetty.StandardResponseProducer) ServiceList(com.adaptris.core.ServiceList) JettyHelper.createChannel(com.adaptris.core.http.jetty.JettyHelper.createChannel) Channel(com.adaptris.core.Channel) JettyMessageConsumer(com.adaptris.core.http.jetty.JettyMessageConsumer) StandaloneProducer(com.adaptris.core.StandaloneProducer)

Aggregations

Channel (com.adaptris.core.Channel)2 ServiceList (com.adaptris.core.ServiceList)2 StandaloneProducer (com.adaptris.core.StandaloneProducer)2 HttpConnection (com.adaptris.core.http.jetty.HttpConnection)2 JettyHelper.createChannel (com.adaptris.core.http.jetty.JettyHelper.createChannel)2 JettyMessageConsumer (com.adaptris.core.http.jetty.JettyMessageConsumer)2 MetadataHeaderHandler (com.adaptris.core.http.jetty.MetadataHeaderHandler)2 StandardResponseProducer (com.adaptris.core.http.jetty.StandardResponseProducer)2 PayloadFromTemplateService (com.adaptris.core.services.metadata.PayloadFromTemplateService)1