Class NEFilterDataProvider

  • All Implemented Interfaces:
    NSObject

    public class NEFilterDataProvider
    extends NEFilterProvider
    [@interface] NEFilterDataProvider The NEFilterDataProvider class declares the programmatic interface for an object that evaluates network data flows based on a set of locally-available rules and makes decisions about whether to block or allow the flows. API-Since: 9.0
    • Constructor Detail

      • NEFilterDataProvider

        protected NEFilterDataProvider​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NEFilterDataProvider allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • handleInboundDataCompleteForFlow

        @NotNull
        public @NotNull NEFilterDataVerdict handleInboundDataCompleteForFlow​(@NotNull
                                                                             @NotNull NEFilterFlow flow)
        handleInboundDataCompleteForFlow: This function is called by the framework after all of the inbound data for a flow has been seen by the filter. Subclasses must override this method to return an appropriate pass/block result.
        Parameters:
        flow - The flow
        Returns:
        The final NEFilterFlowDataVerdict verdict for the flow. API-Since: 9.0
      • handleInboundDataFromFlowReadBytesStartOffsetReadBytes

        @NotNull
        public @NotNull NEFilterDataVerdict handleInboundDataFromFlowReadBytesStartOffsetReadBytes​(@NotNull
                                                                                                   @NotNull NEFilterFlow flow,
                                                                                                   long offset,
                                                                                                   @NotNull
                                                                                                   @NotNull NSData readBytes)
        handleInboundDataFromFlow:readBytesStartOffset:readBytes: This function is called by the framework when a filtering decision needs to be made about some inbound data that the filter previously requested access to via the NEFilterFlowDataVerdict or the NEFilterNewFlowVerdict. Subclasses must override this method.
        Parameters:
        flow - The NEFilterFlow from which the data was read.
        offset - The offset in bytes from the start of the flow's inbound data at which readBytes begins.
        readBytes - The data that was read. For non-UDP/TCP flows, since data may optionally include the IP header, readBytes includes a 4-bytes NEFilterDataAttribute field preceding the user data. Handler must examine the NEFilterDataAttribute field and handle the data accordingly.
        Returns:
        An NEFilterFlowDataVerdict containing the verdict for the flow. API-Since: 9.0
      • handleNewFlow

        @NotNull
        public @NotNull NEFilterNewFlowVerdict handleNewFlow​(@NotNull
                                                             @NotNull NEFilterFlow flow)
        handleNewFlow: This function is called by the framework when a filtering decision needs to be made about a new network data flow. Subclasses must override this method to implement the steps necessary to match the flow against some locally stored rules and return an appropriate verdict.
        Parameters:
        flow - An NEFilterFlow object containing details about the new flow.
        Returns:
        An NEFilterNewFlowVerdict object containing the verdict for the new flow. API-Since: 9.0
      • handleOutboundDataCompleteForFlow

        @NotNull
        public @NotNull NEFilterDataVerdict handleOutboundDataCompleteForFlow​(@NotNull
                                                                              @NotNull NEFilterFlow flow)
        handleOutboundDataCompleteForFlow: This function is called by the framework after all of the outbound data for a flow has been seen by the filter. Subclasses must override this method to return an appropriate pass/block result.
        Parameters:
        flow - The flow
        Returns:
        The final NEFilterFlowDataVerdict verdict for the flow. API-Since: 9.0
      • handleOutboundDataFromFlowReadBytesStartOffsetReadBytes

        @NotNull
        public @NotNull NEFilterDataVerdict handleOutboundDataFromFlowReadBytesStartOffsetReadBytes​(@NotNull
                                                                                                    @NotNull NEFilterFlow flow,
                                                                                                    long offset,
                                                                                                    @NotNull
                                                                                                    @NotNull NSData readBytes)
        handleOutboundDataFromFlow:readBytesStartOffset:readBytes: This function is called by the framework when a filtering decision needs to be made about some outbound data that the filter previously requested access to via the NEFilterFlowDataVerdict or the NEFilterNewFlowVerdict. Subclasses must override this method.
        Parameters:
        flow - The NEFilterFlow from which the data was read.
        offset - The offset in bytes from the start of the flow's outbound data at which readBytes begins.
        readBytes - The data that was read. For non-UDP/TCP flows, since data may optionally include the IP header, readBytes includes a 4-bytes NEFilterDataAttribute field preceding the user data. Handler must examine the NEFilterDataAttribute field and handle the data accordingly.
        Returns:
        An NEFilterFlowDataVerdict containing the verdict for the flow. API-Since: 9.0
      • handleRemediationForFlow

        @NotNull
        public @NotNull NEFilterRemediationVerdict handleRemediationForFlow​(@NotNull
                                                                            @NotNull NEFilterFlow flow)
        handleRemediationForFlow: This function is called by the framework after the user requests remediation for a blocked flow. Subclasses must override this method to return an appropriate pass/block result.
        Parameters:
        flow - The flow
        Returns:
        The final NEFilterRemediationVerdict verdict for the flow. API-Since: 9.0
      • handleRulesChanged

        public void handleRulesChanged()
        handleRulesChanged This function is called by the framework when -[NEFilterControlProvider notifyRulesChanged] is called. Subclasses should override this method to reload new rules from disk. API-Since: 9.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.