Package dalvik.system
Class SocketTagger
- java.lang.Object
-
- dalvik.system.SocketTagger
-
public abstract class SocketTagger extends Object
Callbacks for socket assignment and reassignment.
-
-
Constructor Summary
Constructors Constructor Description SocketTagger()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SocketTaggerget()Returns this process socket tagger.static voidset(SocketTagger tagger)Sets this process' socket tagger totagger.abstract voidtag(FileDescriptor socketDescriptor)Notified whensocketDescriptoris either assigned to the current thread.voidtag(Socket socket)abstract voiduntag(FileDescriptor socketDescriptor)Notified whensocketDescriptoris released from the current thread to a connection pool.voiduntag(Socket socket)
-
-
-
Method Detail
-
tag
public abstract void tag(FileDescriptor socketDescriptor) throws SocketException
Notified whensocketDescriptoris 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 whensocketDescriptoris 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
-
tag
public final void tag(Socket socket) throws SocketException
- Throws:
SocketException
-
untag
public final void untag(Socket socket) throws SocketException
- Throws:
SocketException
-
set
public static void set(SocketTagger tagger)
Sets this process' socket tagger totagger.
-
get
public static SocketTagger get()
Returns this process socket tagger.
-
-