Package dalvik.system

Class SocketTagger


  • public abstract class SocketTagger
    extends Object
    Callbacks for socket assignment and reassignment.
    • Constructor Detail

      • SocketTagger

        public SocketTagger()
    • Method Detail

      • tag

        public abstract void tag​(FileDescriptor socketDescriptor)
                          throws SocketException
        Notified when socketDescriptor is either assigned to the current thread. The socket is either newly connected or reused from a connection pool. Implementations of this method should be thread-safe.
        Throws:
        SocketException
      • untag

        public abstract void untag​(FileDescriptor socketDescriptor)
                            throws SocketException
        Notified when socketDescriptor is released from the current thread to a connection pool. Implementations of this method should be thread-safe.

        Note: this method will not be invoked when the socket is closed.

        Throws:
        SocketException
      • set

        public static void set​(SocketTagger tagger)
        Sets this process' socket tagger to tagger.
      • get

        public static SocketTagger get()
        Returns this process socket tagger.