java.lang.Object
org.wso2.carbon.inbound.endpoint.common.AbstractInboundEndpointManager
org.wso2.carbon.inbound.endpoint.protocol.http.management.HTTPEndpointManager
All Implemented Interfaces:
InboundEndpointManager

public class HTTPEndpointManager extends AbstractInboundEndpointManager
Manager which handles Http Listeners activities for Inbound Endpoints, coordinating with Pass-through APIs and registry etc. This is the central place to mange Http Listeners for Inbound endpoints
  • Method Details

    • getInstance

      public static HTTPEndpointManager getInstance()
    • startEndpoint

      public boolean startEndpoint(int port, String name, org.apache.synapse.inbound.InboundProcessorParams params)
      Start Http Inbound endpoint in a particular port
      Parameters:
      port - port
      name - endpoint name
      params - inbound endpoint params
    • startSSLEndpoint

      public boolean startSSLEndpoint(int port, String name, org.apache.synapse.transport.passthru.core.ssl.SSLConfiguration sslConfiguration, org.apache.synapse.inbound.InboundProcessorParams params)
      Start Https Inbound endpoint in a particular port
      Parameters:
      port - port
      name - endpoint name
    • startListener

      public boolean startListener(int port, String name, org.apache.synapse.inbound.InboundProcessorParams params)
      Start Http Listener in a particular port
      Parameters:
      port - port
      name - endpoint name
      params - inbound endpoint params
    • startSSLListener

      public boolean startSSLListener(int port, String name, org.apache.synapse.transport.passthru.core.ssl.SSLConfiguration sslConfiguration, org.apache.synapse.inbound.InboundProcessorParams params)
      Start Http Listener in a particular port
      Parameters:
      port - port
      name - endpoint name
    • closeEndpoint

      public void closeEndpoint(int port)
      Stop Inbound Endpoint
      Parameters:
      port - port of the endpoint
    • buildConfiguration

      public InboundHttpConfiguration buildConfiguration(int port, String name, org.apache.synapse.inbound.InboundProcessorParams params)
    • loadEndpointListeners

      public void loadEndpointListeners()
      Start Http listeners for all the Inbound Endpoints. This should be called in the server startup to load all the required listeners for endpoints in all tenants
    • addWorkerPool

      public void addWorkerPool(String tenantDomain, int port, WorkerPoolConfiguration workerPoolConfiguration)
      Method for add worker pool configs
      Parameters:
      tenantDomain -
      port -
      workerPoolConfiguration -
    • getWorkerPoolConfiguration

      public WorkerPoolConfiguration getWorkerPoolConfiguration(String tenantDomain, int port)
      Method for get WorkerPool Config
      Parameters:
      tenantDomain -
      port -
      Returns:
    • removeWorkerPoolConfiguration

      public void removeWorkerPoolConfiguration(String tenantDomian, int port)
      Remove Worker Pool
      Parameters:
      tenantDomian - Tenant Domain
      port - Port
    • addDispatchPattern

      public void addDispatchPattern(String tenantDomain, int port, Pattern pattern)
      Adds a dispatch pattern to pattern map.
      Parameters:
      tenantDomain -
      port -
    • removeDispatchPattern

      public void removeDispatchPattern(String tenantDomain, int port)
      Removes a dispatch pattern from pattern map.
      Parameters:
      tenantDomain -
      port -
    • getPattern

      public Pattern getPattern(String tenantDomain, int port)
      Method to get pattern for tenant and port.
      Parameters:
      tenantDomain -
      port -
      Returns:
    • compilePattern

      protected Pattern compilePattern(String dispatchPattern)
    • getInternalHttpApiDispatcher

      public InternalAPIDispatcher getInternalHttpApiDispatcher()
    • getInternalHttpsApiDispatcher

      public InternalAPIDispatcher getInternalHttpsApiDispatcher()
    • getInternalInboundHttpPort

      public int getInternalInboundHttpPort()
    • getInternalInboundHttpsPort

      public int getInternalInboundHttpsPort()
    • isAnyInternalHttpApiEnabled

      public boolean isAnyInternalHttpApiEnabled()
      Checks whether at least one internal http api is enabled.
      Returns:
      - whether any internal http api enabled.
    • isAnyInternalHttpsApiEnabled

      public boolean isAnyInternalHttpsApiEnabled()
      Checks whether at least one internal https api is enabled.
      Returns:
      - whether any internal https api is enabled.