Search in sources :

Example 1 with RawContentTypeProvider

use of com.adaptris.core.http.RawContentTypeProvider in project interlok by adaptris.

the class JettyResponseService method buildProducer.

protected StandardResponseProducer buildProducer(AdaptrisMessage msg) {
    StandardResponseProducer p = new StandardResponseProducer().withContentTypeProvider(new RawContentTypeProvider(msg.resolve(getContentType()))).withResponseHeaderProvider(getResponseHeaderProvider()).withSendPayload(true).withForwardConnectionException(false).withFlushBuffer(true).withStatusProvider(new RawStatusProvider(Integer.parseInt(msg.resolve(getHttpStatus())))).withMessageFactory(msg.getFactory());
    p.registerConnection(new NullConnection());
    return p;
}
Also used : RawStatusProvider(com.adaptris.core.http.server.RawStatusProvider) NullConnection(com.adaptris.core.NullConnection) RawContentTypeProvider(com.adaptris.core.http.RawContentTypeProvider)

Example 2 with RawContentTypeProvider

use of com.adaptris.core.http.RawContentTypeProvider in project interlok by adaptris.

the class HttpRequestServiceImpl method buildProducer.

protected StandardHttpProducer buildProducer(AdaptrisMessage msg) {
    StandardHttpProducer p = new StandardHttpProducer();
    p.setMessageFactory(msg.getFactory());
    p.setUrl(msg.resolve(getUrl()));
    p.setContentTypeProvider(new RawContentTypeProvider(msg.resolve(getContentType())));
    p.setMethodProvider(new ConfiguredRequestMethodProvider(RequestMethod.valueOf(msg.resolve(getMethod()).toUpperCase())));
    p.setAuthenticator(getAuthenticator());
    p.setRequestHeaderProvider(getRequestHeaderProvider());
    p.setResponseHeaderHandler(getResponseHeaderHandler());
    p.registerConnection(new NullConnection());
    return p;
}
Also used : NullConnection(com.adaptris.core.NullConnection) RawContentTypeProvider(com.adaptris.core.http.RawContentTypeProvider) ConfiguredRequestMethodProvider(com.adaptris.core.http.client.ConfiguredRequestMethodProvider)

Aggregations

NullConnection (com.adaptris.core.NullConnection)2 RawContentTypeProvider (com.adaptris.core.http.RawContentTypeProvider)2 ConfiguredRequestMethodProvider (com.adaptris.core.http.client.ConfiguredRequestMethodProvider)1 RawStatusProvider (com.adaptris.core.http.server.RawStatusProvider)1