Detailed Description
The on-premise IP intelligence engine uses a local data file (.ipi) to generate a set of properties about an IP address supplied as evidence.
It wraps the native IpIntelligenceEngineModule produced by SWIG from 51degrees-cxx.
Mirrors DeviceDetectionOnPremise in device-detection/onpremise and IpIntelligenceOnPremise in 51degrees-python.
Inheritance diagram for fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise:
Collaboration diagram for fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise:
Public Member Functions | |
| __construct (array $settings=[]) | |
| getEvidenceKeyFilter () | |
| The accepted evidence keys (query.client-ip, server.client-ip, query.client-ip-51d, ...). | |
| processInternal (FlowData $flowData) | |
| Process FlowData - this is process function is usually overridden by specific FlowElements to do their core work. | |
| close () | |
| Release the native engine this element built from its dataFile setting. | |
| setCache (?DataKeyedCache $cache) | |
| The on-premise engine manages its own internal cache and does not support an external cache. | |
| refreshData (?string $fileName=null) | |
| Ask the engine to start using the specified data file for lookups. | |
| getProduct () | |
| The product (data tier) of the loaded data file. | |
Public Member Functions inherited from fiftyone\pipeline\engines\Engine | |
| getDataSourceTier () | |
| Get the tier to which the current data source belongs. | |
| setCache (DataKeyedCache $cache) | |
| Add a cache to an engine. | |
| setRestrictedProperties (array $propertiesList) | |
| Add a subset of properties. | |
| inCache (FlowData $flowData) | |
| A method to check if a flowData's evidence is in the cache. | |
| process (FlowData $flowData) | |
| Engine's core process function. | |
Public Member Functions inherited from fiftyone\pipeline\core\FlowElement | |
| __construct () | |
| A default dummy constructor is needed for there are classes inheriting this class deeper than 1-level of inheritance and calling parent::__construct() in their explicit constructors. | |
| filterEvidence (FlowData $flowData) | |
| Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. | |
| filterEvidenceKey (string $key) | |
| Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. | |
| onRegistration (Pipeline $pipeline) | |
| Callback called when an engine is added to a pipeline. | |
| getProperties () | |
| Get properties Usually overridden by specific FlowElements. | |
| updatePropertyList () | |
| Update a FlowElement's property list This is used by elements that are only aware of their properties at a later stage, such as cloud request based FlowElements or FlowElements that change their properties later based on new datafiles. | |
Data Fields | |
| string | $dataKey = Constants::ELEMENT_DATA_KEY |
| $engine | |
Data Fields inherited from fiftyone\pipeline\engines\Engine | |
| array | $restrictedProperties |
Data Fields inherited from fiftyone\pipeline\core\FlowElement | |
| string | $dataKey |
| array | $properties = [] |
| array | $pipelines = [] |
Constructor & Destructor Documentation
◆ __construct()
| fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise::__construct | ( | array | $settings = [] | ) |
- Parameters
-
array<string,mixed> $settings dataFile - (required, unless the global engine is used) path to the .ipi data file. performanceProfile - (optional) one of Constants::PERFORMANCE_PROFILES, defaulting to Constants::DEFAULT_PERFORMANCE_PROFILE. restrictedProperties- (optional) list of properties to populate. concurrency - (optional) expected concurrent accesses.
Omitting "dataFile" reuses the shared global engine when one exists. That engine comes from the FiftyOneDegreesIpIntelligenceEngine.* ini settings, so ENGINE_SETTINGS are rejected on that path.
- Exceptions
-
Exception
Member Function Documentation
◆ close()
| fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise::close | ( | ) |
Release the native engine this element built from its dataFile setting.
Its data is freed once no results read from it are still held, so close every FlowData it processed as well. The shared global engine belongs to the extension and stays loaded. Closing the Pipeline closes the element.
◆ getEvidenceKeyFilter()
| fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise::getEvidenceKeyFilter | ( | ) |
The accepted evidence keys (query.client-ip, server.client-ip, query.client-ip-51d, ...).
Note that this engine performs a single-IP lookup: only the first parseable IPv4/IPv6 value from the evidence (in the priority order used by getClientIps) actually drives the lookup. This is not multi-evidence detection.
Reimplemented from fiftyone\pipeline\core\FlowElement.
◆ getProduct()
| fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise::getProduct | ( | ) |
The product (data tier) of the loaded data file.
Used by the missing property service.
◆ processInternal()
| fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise::processInternal | ( | FlowData | $flowData | ) |
Process FlowData - this is process function is usually overridden by specific FlowElements to do their core work.
Reimplemented from fiftyone\pipeline\core\FlowElement.
◆ refreshData()
| fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise::refreshData | ( | ?string | $fileName = null | ) |
Ask the engine to start using the specified data file for lookups.
- Parameters
-
null | string $fileName Path to a new data file, or null to reload the existing one from disk.
◆ setCache()
| fiftyone\pipeline\ipintelligence\IpIntelligenceOnPremise::setCache | ( | ?DataKeyedCache | $cache | ) |
The on-premise engine manages its own internal cache and does not support an external cache.
- Exceptions
-
Exception
