Class ServiceProxy

All Implemented Interfaces:
Rule, Cloneable
Direct Known Subclasses:
APIProxy, SwaggerProxy

public class ServiceProxy extends AbstractServiceProxy
Description

A service proxy can be deployed on front of a Web server, Web Service or a REST resource. It conceals the server and offers the same interface as the target server to its clients.

Topic
2. Proxies
  • Constructor Details

    • ServiceProxy

      public ServiceProxy()
    • ServiceProxy

      public ServiceProxy(ServiceProxyKey ruleKey, String targetHost, int targetPort)
  • Method Details

    • init

      public void init() throws Exception
      Overrides:
      init in class AbstractServiceProxy
      Throws:
      Exception
    • hasAdminConsole

      public boolean hasAdminConsole()
    • etcdRegistryApiConfigExists

      public boolean etcdRegistryApiConfigExists()
    • getNewInstance

      protected AbstractProxy getNewInstance()
      Specified by:
      getNewInstance in class AbstractProxy
    • getMethod

      public String getMethod()
    • setMethod

      public void setMethod(String method)
      Default
      *
      Description
      If set, Membrane will only consider this rule, if the method (GET, PUT, POST, DELETE, etc.) header of incoming HTTP requests matches. The asterisk '*' matches any method.
      Example
      GET
    • getExternalHostname

      public String getExternalHostname()
    • setExternalHostname

      public void setExternalHostname(String externalHostname)
    • getTarget

      public AbstractServiceProxy.Target getTarget()
    • setTarget

      public void setTarget(AbstractServiceProxy.Target target)
    • setTargetHost

      public void setTargetHost(String targetHost)
    • setTargetPort

      public void setTargetPort(int targetPort)
    • setTargetURL

      public void setTargetURL(String targetURL)