use of com.predic8.membrane.core.rules.ServiceProxyKey in project service-proxy by membrane.
the class MultipleLoadBalancersTest method createBalancingInterceptor.
private LoadBalancingInterceptor createBalancingInterceptor(int port, String name) throws Exception {
ServiceProxy sp3 = new ServiceProxy(new ServiceProxyKey("localhost", "POST", ".*", port), "thomas-bayer.com", 80);
LoadBalancingInterceptor balancingInterceptor1 = new LoadBalancingInterceptor();
balancingInterceptor1.setName(name);
sp3.getInterceptors().add(balancingInterceptor1);
balancer.getRuleManager().addProxyAndOpenPortIfNew(sp3);
balancer.init();
return balancingInterceptor1;
}
use of com.predic8.membrane.core.rules.ServiceProxyKey in project service-proxy by membrane.
the class WSDLPublisherTest method before.
@Before
public void before() throws Exception {
router = new HttpRouter();
ServiceProxy sp2 = new ServiceProxy(new ServiceProxyKey("*", "*", ".*", port), "", -1);
WSDLPublisherInterceptor wi = new WSDLPublisherInterceptor();
wi.setWsdl(wsdlLocation);
wi.init(router);
sp2.getInterceptors().add(wi);
router.getRuleManager().addProxyAndOpenPortIfNew(sp2);
router.init();
}
use of com.predic8.membrane.core.rules.ServiceProxyKey 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.rules.ServiceProxyKey in project service-proxy by membrane.
the class RewriteInterceptorIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
interceptor = new RewriteInterceptor();
interceptor.getMappings().add(new Mapping("/blz-service\\?wsdl", "/axis2/services/BLZService?wsdl", null));
Rule rule = new ServiceProxy(new ServiceProxyKey("localhost", "POST", ".*", 3006), "thomas-bayer.com", 80);
rule.getInterceptors().add(interceptor);
router = new HttpRouter();
router.getRuleManager().addProxyAndOpenPortIfNew(rule);
}
use of com.predic8.membrane.core.rules.ServiceProxyKey in project service-proxy by membrane.
the class REST2SOAPInterceptorIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
Rule rule = new ServiceProxy(new ServiceProxyKey("localhost", "*", ".*", 3004), "www.thomas-bayer.com", 80);
router = new HttpRouter();
router.getRuleManager().addProxyAndOpenPortIfNew(rule);
REST2SOAPInterceptor rest2SoapInt = new REST2SOAPInterceptor();
rest2SoapInt.setMappings(getMappings());
rule.getInterceptors().add(rest2SoapInt);
router.init();
}
Aggregations