Search in sources :

Example 1 with HttpProxyRuleBase

use of io.fabric8.gateway.model.HttpProxyRuleBase in project fabric8 by jboss-fuse.

the class ProxyServlet method init.

/**
 * Initialize the <code>ProxyServlet</code>
 *
 * @param config The Servlet configuration passed in by the servlet container
 */
@Override
public void init(ServletConfig config) throws ServletException {
    HttpProxyRuleBase ruleBase = new HttpProxyRuleBase();
    loadRuleBase(config, ruleBase);
    resolver.setMappingRules(ruleBase);
    Protocol.registerProtocol("http", new Protocol("http", new NonBindingSocketFactory(), 80));
    Protocol.registerProtocol("https", new Protocol("https", new NonBindingSocketFactory(), 443));
}
Also used : HttpProxyRuleBase(io.fabric8.gateway.model.HttpProxyRuleBase) Protocol(org.apache.commons.httpclient.protocol.Protocol) NonBindingSocketFactory(io.fabric8.gateway.servlet.support.NonBindingSocketFactory)

Aggregations

HttpProxyRuleBase (io.fabric8.gateway.model.HttpProxyRuleBase)1 NonBindingSocketFactory (io.fabric8.gateway.servlet.support.NonBindingSocketFactory)1 Protocol (org.apache.commons.httpclient.protocol.Protocol)1