Class NSXPCListener

  • All Implemented Interfaces:
    NSObject

    public class NSXPCListener
    extends NSObject
    Each NSXPCListener instance has a private serial queue. This queue is used when sending the delegate messages. API-Since: 6.0
    • Constructor Detail

      • NSXPCListener

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NSXPCListener allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • anonymousListener

        @NotNull
        public static @NotNull NSXPCListener anonymousListener()
        Create an anonymous listener connection. Other processes may connect to this listener by passing this listener object's endpoint to NSXPCConnection's -initWithListenerEndpoint: method.
      • 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()
      • delegate

        @Nullable
        public @Nullable NSXPCListenerDelegate delegate()
        The delegate for the connection listener. If no delegate is set, all new connections will be rejected. See the protocol for more information on how to implement it.
      • description_static

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

        @NotNull
        public @NotNull NSXPCListenerEndpoint endpoint()
        Get an endpoint object which may be sent over an existing connection. This allows the receiver of the endpoint to create a new connection to this NSXPCListener. The NSXPCListenerEndpoint uniquely names this listener object across connections.
      • 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)
      • invalidate

        public void invalidate()
        Invalidate the listener. No more connections will be created. Once a listener is invalidated it may not be resumed or suspended.
      • 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)
      • resume

        public void resume()
        All listeners start suspended and must be resumed before they will process incoming requests. If called on the serviceListener, this method will never return. Call it as the last step inside your main function in your XPC service after setting up desired initial state and the listener itself. If called on any other NSXPCListener, the connection is resumed and the method returns immediately. For new code, calling `-activate` is preferred for the initial activation of the listener.
      • serviceListener

        @NotNull
        public static @NotNull NSXPCListener serviceListener()
        If your listener is an XPCService (that is, in the XPCServices folder of an application or framework), then use this method to get the shared, singleton NSXPCListener object that will await new connections. When the resume method is called on this listener, it will not return. Instead it hands over control to the object and allows it to service the listener as appropriate. This makes it ideal for use in your main() function. For more info on XPCServices, please refer to the developer documentation.
      • setDelegate_unsafe

        public void setDelegate_unsafe​(@Nullable
                                       @Nullable NSXPCListenerDelegate value)
        The delegate for the connection listener. If no delegate is set, all new connections will be rejected. See the protocol for more information on how to implement it.
      • setDelegate

        public void setDelegate​(@Nullable
                                @Nullable NSXPCListenerDelegate value)
        The delegate for the connection listener. If no delegate is set, all new connections will be rejected. See the protocol for more information on how to implement it.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public void suspend()
        Suspend the listener. Suspends must be balanced with resumes before the listener may be invalidated.
      • version_static

        public static long version_static()
      • activate

        public void activate()
        Activates the listener. Listeners start in an inactive state. You must call `-activate` on a listener before it will send or receive any messages. Calling `-activate` on an active listener has no effect. For backward compatibility reasons, `-resume` on an inactive and otherwise not suspended NSXPCListener has the same effect as calling `-activate`. For new code, using `-activate` is preferred. API-Since: 14.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.