Search in sources :

Example 1 with HttpTransport

use of com.predic8.membrane.core.transport.http.HttpTransport in project service-proxy by membrane.

the class HttpRouter method createTransport.

/**
 * Same as the default config from monitor-beans.xml
 */
private Transport createTransport(ProxyConfiguration proxyConfiguration) {
    Transport transport = new HttpTransport();
    List<Interceptor> interceptors = new ArrayList<Interceptor>();
    interceptors.add(new RuleMatchingInterceptor());
    interceptors.add(new DispatchingInterceptor());
    interceptors.add(new UserFeatureInterceptor());
    HTTPClientInterceptor httpClientInterceptor = new HTTPClientInterceptor();
    interceptors.add(httpClientInterceptor);
    transport.setInterceptors(interceptors);
    return transport;
}
Also used : HttpTransport(com.predic8.membrane.core.transport.http.HttpTransport) HTTPClientInterceptor(com.predic8.membrane.core.interceptor.HTTPClientInterceptor) ArrayList(java.util.ArrayList) HttpTransport(com.predic8.membrane.core.transport.http.HttpTransport) Transport(com.predic8.membrane.core.transport.Transport) HTTPClientInterceptor(com.predic8.membrane.core.interceptor.HTTPClientInterceptor) RuleMatchingInterceptor(com.predic8.membrane.core.interceptor.RuleMatchingInterceptor) Interceptor(com.predic8.membrane.core.interceptor.Interceptor) UserFeatureInterceptor(com.predic8.membrane.core.interceptor.UserFeatureInterceptor) DispatchingInterceptor(com.predic8.membrane.core.interceptor.DispatchingInterceptor) UserFeatureInterceptor(com.predic8.membrane.core.interceptor.UserFeatureInterceptor) RuleMatchingInterceptor(com.predic8.membrane.core.interceptor.RuleMatchingInterceptor) DispatchingInterceptor(com.predic8.membrane.core.interceptor.DispatchingInterceptor)

Aggregations

DispatchingInterceptor (com.predic8.membrane.core.interceptor.DispatchingInterceptor)1 HTTPClientInterceptor (com.predic8.membrane.core.interceptor.HTTPClientInterceptor)1 Interceptor (com.predic8.membrane.core.interceptor.Interceptor)1 RuleMatchingInterceptor (com.predic8.membrane.core.interceptor.RuleMatchingInterceptor)1 UserFeatureInterceptor (com.predic8.membrane.core.interceptor.UserFeatureInterceptor)1 Transport (com.predic8.membrane.core.transport.Transport)1 HttpTransport (com.predic8.membrane.core.transport.http.HttpTransport)1 ArrayList (java.util.ArrayList)1