@Path(value="")
public class ListenHTTPServlet
extends javax.servlet.http.HttpServlet
| Constructor and Description |
|---|
ListenHTTPServlet() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addMatchingRequestHeaders(javax.servlet.http.HttpServletRequest request,
Map<String,String> attributes) |
private void |
deleteMultiPartFiles(javax.servlet.http.HttpServletRequest request) |
protected void |
doHead(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
private FlowFileUnpackager |
getFlowFileUnpackager(String contentType) |
private void |
handleException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ProcessSession session,
String foundSubject,
String foundIssuer,
Throwable t) |
private Set<FlowFile> |
handleMultipartRequest(javax.servlet.http.HttpServletRequest request,
ProcessSession session,
String foundSubject,
String foundIssuer) |
private Set<FlowFile> |
handleRequest(javax.servlet.http.HttpServletRequest request,
ProcessSession session,
String foundSubject,
String foundIssuer,
boolean destinationIsLegacyNiFi,
String contentType,
InputStream in) |
void |
init(javax.servlet.ServletConfig config) |
private boolean |
isRecordProcessing() |
protected void |
proceedFlow(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ProcessSession session,
String foundSubject,
String foundIssuer,
boolean createHold,
Set<FlowFile> flowFileSet) |
private void |
processRecord(InputStream in,
FlowFile flowFile,
OutputStream out) |
private void |
putAttribute(Map<String,String> map,
String key,
Object value) |
private void |
putAttribute(Map<String,String> map,
String key,
String value) |
private FlowFile |
savePartDetailsAsAttributes(ProcessSession session,
javax.servlet.http.Part part,
FlowFile flowFile,
int sequenceNumber,
int allPartsCount) |
protected FlowFile |
saveRequestDetailsAsAttributes(javax.servlet.http.HttpServletRequest request,
ProcessSession session,
String foundSubject,
String foundIssuer,
FlowFile flowFile) |
void |
setPort(int port) |
doDelete, doGet, doOptions, doPut, doTrace, getLastModified, service, serviceprivate static final long serialVersionUID
public static final String FLOWFILE_CONFIRMATION_HEADER
public static final String LOCATION_HEADER_NAME
public static final String DEFAULT_FOUND_SUBJECT
public static final String DEFAULT_FOUND_ISSUER
public static final String LOCATION_URI_INTENT_NAME
public static final String LOCATION_URI_INTENT_VALUE
public static final int FILES_BEFORE_CHECKING_DESTINATION_SPACE
public static final String ACCEPT_HEADER_NAME
public static final String ACCEPT_HEADER_VALUE
public static final String ACCEPT_ENCODING_NAME
public static final String ACCEPT_ENCODING_VALUE
public static final String GZIPPED_HEADER
public static final String PROTOCOL_VERSION_HEADER
public static final String PROTOCOL_VERSION
protected static final String CONTENT_ENCODING_HEADER
private final AtomicLong filesReceived
private final AtomicBoolean spaceAvailable
private ComponentLog logger
private AtomicReference<ProcessSessionFactory> sessionFactoryHolder
private volatile ProcessContext processContext
private Pattern authorizedPattern
private Pattern authorizedIssuerPattern
private Pattern headerPattern
private ConcurrentMap<String,ListenHTTP.FlowFileEntryTimeWrapper> flowFileMap
private StreamThrottler streamThrottler
private String basePath
private int returnCode
private long multipartRequestMaxSize
private int multipartReadBufferSize
private int port
private RecordReaderFactory readerFactory
private RecordSetWriterFactory writerFactory
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionpublic void setPort(int port)
protected void doHead(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doHead in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprivate void deleteMultiPartFiles(javax.servlet.http.HttpServletRequest request)
private void handleException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ProcessSession session,
String foundSubject,
String foundIssuer,
Throwable t)
throws IOException
IOExceptionprivate Set<FlowFile> handleMultipartRequest(javax.servlet.http.HttpServletRequest request, ProcessSession session, String foundSubject, String foundIssuer) throws IOException, IllegalStateException, javax.servlet.ServletException
IOExceptionIllegalStateExceptionjavax.servlet.ServletExceptionprivate FlowFile savePartDetailsAsAttributes(ProcessSession session, javax.servlet.http.Part part, FlowFile flowFile, int sequenceNumber, int allPartsCount)
private Set<FlowFile> handleRequest(javax.servlet.http.HttpServletRequest request, ProcessSession session, String foundSubject, String foundIssuer, boolean destinationIsLegacyNiFi, String contentType, InputStream in) throws IOException
IOExceptionprotected void proceedFlow(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ProcessSession session,
String foundSubject,
String foundIssuer,
boolean createHold,
Set<FlowFile> flowFileSet)
throws IOException
IOExceptionprotected FlowFile saveRequestDetailsAsAttributes(javax.servlet.http.HttpServletRequest request, ProcessSession session, String foundSubject, String foundIssuer, FlowFile flowFile)
private void processRecord(InputStream in, FlowFile flowFile, OutputStream out)
private FlowFileUnpackager getFlowFileUnpackager(String contentType)
private void addMatchingRequestHeaders(javax.servlet.http.HttpServletRequest request,
Map<String,String> attributes)
private boolean isRecordProcessing()
Copyright © 2023 Apache NiFi Project. All rights reserved.