@InputRequirement(value=INPUT_REQUIRED) @Tags(value={"http","https","response","egress","web service"}) @CapabilityDescription(value="Sends an HTTP Response to the Requestor that generated a FlowFile. This Processor is designed to be used in conjunction with the HandleHttpRequest in order to create a web service.") @DynamicProperty(name="An HTTP header name", value="An HTTP header value", description="These HTTPHeaders are set in the HTTP Response") @ReadsAttribute(attribute="http.context.identifier",description="The value of this attribute is used to lookup the HTTP Response so that the proper message can be sent back to the requestor. If this attribute is missing, the FlowFile will be routed to \'failure.\'") @ReadsAttribute(attribute="http.request.uri",description="Value of the URI requested by the client. Used for provenance event.") @ReadsAttribute(attribute="http.remote.host",description="IP address of the client. Used for provenance event.") @ReadsAttribute(attribute="http.local.name",description="IP address/hostname of the server. Used for provenance event.") @ReadsAttribute(attribute="http.server.port",description="Listening port of the server. Used for provenance event.") @ReadsAttribute(attribute="http.subject.dn",description="SSL distinguished name (if any). Used for provenance event.") @SeeAlso(value=HandleHttpRequest.class, classNames={"org.apache.nifi.http.StandardHttpContextMap","org.apache.nifi.ssl.StandardSSLContextService"}) public class HandleHttpResponse extends AbstractProcessor
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor |
HTTP_CONTEXT_MAP |
static java.util.regex.Pattern |
NUMBER_PATTERN |
static Relationship |
REL_FAILURE |
static Relationship |
REL_SUCCESS |
static PropertyDescriptor |
STATUS_CODE |
Constructor and Description |
---|
HandleHttpResponse() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Relationship> |
getRelationships() |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(java.lang.String propertyDescriptorName)
Used to allow subclasses to determine what PropertyDescriptor if any to
use when a property is requested for which a descriptor is not already
registered.
|
java.util.List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Allows subclasses to register which property descriptor objects are
supported.
|
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public static final java.util.regex.Pattern NUMBER_PATTERN
public static final PropertyDescriptor STATUS_CODE
public static final PropertyDescriptor HTTP_CONTEXT_MAP
public static final Relationship REL_SUCCESS
public static final Relationship REL_FAILURE
public final java.util.List<PropertyDescriptor> getSupportedPropertyDescriptors()
AbstractConfigurableComponent
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public java.util.Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(java.lang.String propertyDescriptorName)
AbstractConfigurableComponent
Used to allow subclasses to determine what PropertyDescriptor if any to use when a property is requested for which a descriptor is not already registered. By default this method simply returns a null descriptor. By overriding this method processor implementations can support dynamic properties since this allows them to register properties on demand. It is acceptable for a dynamically generated property to indicate it is required so long as it is understood it is only required once set. Dynamic properties by definition cannot be required until used.
This method should be side effect free in the subclasses in terms of how often it is called for a given property name because there is guarantees how often it will be called for a given property name.
Default is null.
getSupportedDynamicPropertyDescriptor
in class AbstractConfigurableComponent
propertyDescriptorName
- used to lookup if any property descriptors exist for that namepublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger
in class AbstractProcessor
ProcessException