Getting started Community Training Tutorials Documentation APIs, AI & Tools
@Alias("listener")
public class HttpListener extends Source<InputStream, HttpRequestAttributes> {
private static final Logger LOGGER = getLogger(HttpListener.class);
@Connection
private ConnectionProvider<HttpServer> serverProvider;
private ComponentLocation location;
@Parameter
private String path;
private HttpServer server;
@Override
public void onStart(SourceCallback<InputStream, HttpRequestAttributes> sourceCallback) throws MuleException {
server = serverProvider.connect();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Starting HTTP Listener %s on path %s", location.getLocation(), path);
}
server.listen(path);
}
// ...
}



