Class HTTPEndpointManager
- 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
-
-
Field Summary
-
Fields inherited from class org.wso2.carbon.inbound.endpoint.common.AbstractInboundEndpointManager
dataStore
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDispatchPattern(String tenantDomain, int port, Pattern pattern)
Adds a dispatch pattern to pattern map.void
addWorkerPool(String tenantDomain, int port, WorkerPoolConfiguration workerPoolConfiguration)
Method for add worker pool configsInboundHttpConfiguration
buildConfiguration(int port, String name, org.apache.synapse.inbound.InboundProcessorParams params)
void
closeEndpoint(int port)
Stop Inbound Endpointprotected Pattern
compilePattern(String dispatchPattern)
static HTTPEndpointManager
getInstance()
InternalAPIDispatcher
getInternalHttpApiDispatcher()
InternalAPIDispatcher
getInternalHttpsApiDispatcher()
int
getInternalInboundHttpPort()
int
getInternalInboundHttpsPort()
Pattern
getPattern(String tenantDomain, int port)
Method to get pattern for tenant and port.WorkerPoolConfiguration
getWorkerPoolConfiguration(String tenantDomain, int port)
Method for get WorkerPool Configboolean
isAnyInternalHttpApiEnabled()
Checks whether at least one internal http api is enabled.boolean
isAnyInternalHttpsApiEnabled()
Checks whether at least one internal https api is enabled.void
loadEndpointListeners()
Start Http listeners for all the Inbound Endpoints.void
removeDispatchPattern(String tenantDomain, int port)
Removes a dispatch pattern from pattern map.void
removeWorkerPoolConfiguration(String tenantDomian, int port)
Remove Worker Poolboolean
startEndpoint(int port, String name, org.apache.synapse.inbound.InboundProcessorParams params)
Start Http Inbound endpoint in a particular portboolean
startListener(int port, String name, org.apache.synapse.inbound.InboundProcessorParams params)
Start Http Listener in a particular portboolean
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 portboolean
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-
Methods inherited from class org.wso2.carbon.inbound.endpoint.common.AbstractInboundEndpointManager
getEndpointName
-
-
-
-
Method Detail
-
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
- portname
- endpoint nameparams
- 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
- portname
- 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
- portname
- endpoint nameparams
- 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
- portname
- 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 Domainport
- 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:
-
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.
-
-