use of com.predic8.membrane.core.interceptor.MockInterceptor in project service-proxy by membrane.
the class ServiceInvocationTest method createServiceRule.
private ServiceProxy createServiceRule() {
ServiceProxy rule = new ServiceProxy(new ServiceProxyKey("localhost", "*", "*", 3012), "thomas-bayer.com", 80);
rule.setName("log");
rule.getInterceptors().add(new MockInterceptor("log"));
return rule;
}
use of com.predic8.membrane.core.interceptor.MockInterceptor in project service-proxy by membrane.
the class ServiceInvocationTest method createFirstRule.
private ServiceProxy createFirstRule() {
ServiceProxy rule = new ServiceProxy(new ServiceProxyKey("localhost", Request.METHOD_POST, "*", 3016), "thomas-bayer.com", 80);
rule.setTargetURL("service:log");
rule.getInterceptors().add(new MockInterceptor("process"));
return rule;
}
use of com.predic8.membrane.core.interceptor.MockInterceptor in project service-proxy by membrane.
the class ServiceInvocationTest method createRouter.
private HttpRouter createRouter() throws Exception {
HttpRouter router = new HttpRouter();
router.getRuleManager().addProxyAndOpenPortIfNew(createFirstRule());
router.getRuleManager().addProxyAndOpenPortIfNew(createServiceRule());
router.getTransport().getInterceptors().add(router.getTransport().getInterceptors().size() - 1, new MockInterceptor("transport-log"));
router.init();
return router;
}
Aggregations