public class HttpListenerBuilder extends Object
Constructor and Description |
---|
HttpListenerBuilder(MuleContext muleContext) |
Modifier and Type | Method and Description |
---|---|
HttpListener |
build() |
HttpListenerBuilder |
setErrorReasonPhrase(String reasonPhrase) |
HttpListenerBuilder |
setErrorStatusCode(String statusCode) |
HttpListenerBuilder |
setFlow(Flow flow) |
HttpListenerBuilder |
setHost(String host) |
HttpListenerBuilder |
setListenerConfig(HttpListenerConfig httpListenerConfig) |
HttpListenerBuilder |
setPath(String path) |
HttpListenerBuilder |
setPort(int port) |
HttpListenerBuilder |
setSuccessReasonPhrase(String reasonPhrase) |
HttpListenerBuilder |
setSuccessStatusCode(String statusCode) |
HttpListenerBuilder |
setTlsContextFactory(TlsContextFactory tlsContextFactory) |
HttpListenerBuilder |
setUrl(URL url)
Configures the protocol, host, port and path using the provided url.
|
public HttpListenerBuilder(MuleContext muleContext)
public HttpListenerBuilder setUrl(URL url)
url
- the listener urlMalformedURLException
public HttpListenerBuilder setPort(int port)
port
- port to use for the listenerpublic HttpListenerBuilder setHost(String host)
host
- host to use for the listenerpublic HttpListenerBuilder setFlow(Flow flow)
flow
- flow that will be listening handling the requestspublic HttpListenerBuilder setSuccessStatusCode(String statusCode)
statusCode
- sets the status code to use when the request processing was successful. Allows MEL expressions.public HttpListenerBuilder setSuccessReasonPhrase(String reasonPhrase)
reasonPhrase
- sets the reason phrase of the response when the request processing was successful. Allows MEL expressions.public HttpListenerBuilder setErrorStatusCode(String statusCode)
statusCode
- sets the status code to use when the request processing failed. Allows MEL expressions.public HttpListenerBuilder setErrorReasonPhrase(String reasonPhrase)
reasonPhrase
- sets the reason phrase of the response when the request processing failed. Allows MEL expressions.public HttpListenerBuilder setTlsContextFactory(TlsContextFactory tlsContextFactory)
tlsContextFactory
- TLS configuration to use to set up the listener.public HttpListenerBuilder setPath(String path)
path
- sets the path in which the listener will be listening. Follows http:listener path attribute pattern matching.public HttpListener build() throws MuleException
MuleException
public HttpListenerBuilder setListenerConfig(HttpListenerConfig httpListenerConfig)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.