Class ListenHTTPServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.nifi.processors.standard.servlets.ListenHTTPServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
@Path("")
public class ListenHTTPServlet
extends jakarta.servlet.http.HttpServlet
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate Patternprivate Patternprivate Stringprotected static final Stringstatic final Stringstatic final Stringstatic final intprivate final AtomicLongstatic final Stringstatic final Stringprivate Patternstatic final Stringstatic final Stringstatic final Stringprivate org.apache.nifi.logging.ComponentLogprivate intprivate longprivate intprivate org.apache.nifi.processor.ProcessContextstatic final Stringstatic final Stringprivate RecordReaderFactoryprivate intprivate static final longprivate AtomicReference<org.apache.nifi.processor.ProcessSessionFactory> private final AtomicBooleanprivate RecordSetWriterFactoryFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddMatchingRequestHeaders(jakarta.servlet.http.HttpServletRequest request, Map<String, String> attributes) private voiddeleteMultiPartFiles(jakarta.servlet.http.HttpServletRequest request) voiddoHead(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) voiddoPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) private FlowFileUnpackagergetFlowFileUnpackager(String contentType) private voidhandleException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer, Throwable t) private Set<org.apache.nifi.flowfile.FlowFile> handleMultipartRequest(jakarta.servlet.http.HttpServletRequest request, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer) private Set<org.apache.nifi.flowfile.FlowFile> handleRequest(jakarta.servlet.http.HttpServletRequest request, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer, boolean destinationIsLegacyNiFi, String contentType, InputStream in) voidinit(jakarta.servlet.ServletConfig config) private booleanprotected voidproceedFlow(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer, boolean createHold, Set<org.apache.nifi.flowfile.FlowFile> flowFileSet) private voidprocessRecord(InputStream in, org.apache.nifi.flowfile.FlowFile flowFile, OutputStream out) private voidprivate voidprivate org.apache.nifi.flowfile.FlowFilesavePartDetailsAsAttributes(org.apache.nifi.processor.ProcessSession session, jakarta.servlet.http.Part part, org.apache.nifi.flowfile.FlowFile flowFile, int sequenceNumber, int allPartsCount) protected org.apache.nifi.flowfile.FlowFilesaveRequestDetailsAsAttributes(jakarta.servlet.http.HttpServletRequest request, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer, org.apache.nifi.flowfile.FlowFile flowFile) voidsetPort(int port) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doOptions, doPatch, doPut, doTrace, getLastModified, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
FLOWFILE_CONFIRMATION_HEADER
- See Also:
-
LOCATION_HEADER_NAME
- See Also:
-
DEFAULT_FOUND_SUBJECT
- See Also:
-
DEFAULT_FOUND_ISSUER
- See Also:
-
LOCATION_URI_INTENT_NAME
- See Also:
-
LOCATION_URI_INTENT_VALUE
- See Also:
-
FILES_BEFORE_CHECKING_DESTINATION_SPACE
public static final int FILES_BEFORE_CHECKING_DESTINATION_SPACE- See Also:
-
ACCEPT_HEADER_NAME
- See Also:
-
ACCEPT_HEADER_VALUE
-
ACCEPT_ENCODING_NAME
- See Also:
-
ACCEPT_ENCODING_VALUE
- See Also:
-
GZIPPED_HEADER
- See Also:
-
PROTOCOL_VERSION_HEADER
- See Also:
-
PROTOCOL_VERSION
- See Also:
-
CONTENT_ENCODING_HEADER
- See Also:
-
filesReceived
-
spaceAvailable
-
logger
private org.apache.nifi.logging.ComponentLog logger -
sessionFactoryHolder
-
processContext
private volatile org.apache.nifi.processor.ProcessContext processContext -
authorizedPattern
-
authorizedIssuerPattern
-
headerPattern
-
flowFileMap
-
basePath
-
returnCode
private int returnCode -
multipartRequestMaxSize
private long multipartRequestMaxSize -
multipartReadBufferSize
private int multipartReadBufferSize -
port
private int port -
readerFactory
-
writerFactory
-
-
Constructor Details
-
ListenHTTPServlet
public ListenHTTPServlet()
-
-
Method Details
-
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletException
-
setPort
public void setPort(int port) -
doHead
public void doHead(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Overrides:
doHeadin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
doPost
public void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Overrides:
doPostin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
deleteMultiPartFiles
private void deleteMultiPartFiles(jakarta.servlet.http.HttpServletRequest request) -
handleException
private void handleException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer, Throwable t) throws IOException - Throws:
IOException
-
handleMultipartRequest
private Set<org.apache.nifi.flowfile.FlowFile> handleMultipartRequest(jakarta.servlet.http.HttpServletRequest request, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer) throws IOException, IllegalStateException, jakarta.servlet.ServletException - Throws:
IOExceptionIllegalStateExceptionjakarta.servlet.ServletException
-
savePartDetailsAsAttributes
private org.apache.nifi.flowfile.FlowFile savePartDetailsAsAttributes(org.apache.nifi.processor.ProcessSession session, jakarta.servlet.http.Part part, org.apache.nifi.flowfile.FlowFile flowFile, int sequenceNumber, int allPartsCount) -
handleRequest
private Set<org.apache.nifi.flowfile.FlowFile> handleRequest(jakarta.servlet.http.HttpServletRequest request, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer, boolean destinationIsLegacyNiFi, String contentType, InputStream in) throws IOException - Throws:
IOException
-
proceedFlow
protected void proceedFlow(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.apache.nifi.processor.ProcessSession session, String foundSubject, String foundIssuer, boolean createHold, Set<org.apache.nifi.flowfile.FlowFile> flowFileSet) throws IOException - Throws:
IOException
-
saveRequestDetailsAsAttributes
-
processRecord
private void processRecord(InputStream in, org.apache.nifi.flowfile.FlowFile flowFile, OutputStream out) -
getFlowFileUnpackager
-
addMatchingRequestHeaders
-
putAttribute
-
putAttribute
-
isRecordProcessing
private boolean isRecordProcessing()
-