public abstract class SocketTagger extends Object
| Constructor and Description |
|---|
SocketTagger() |
| Modifier and Type | Method and Description |
|---|---|
static SocketTagger |
get()
Returns this process socket tagger.
|
static void |
set(SocketTagger tagger)
Sets this process' socket tagger to
tagger. |
abstract void |
tag(FileDescriptor socketDescriptor)
Notified when
socketDescriptor is either assigned to the current
thread. |
void |
tag(Socket socket) |
abstract void |
untag(FileDescriptor socketDescriptor)
Notified when
socketDescriptor is released from the current
thread to a connection pool. |
void |
untag(Socket socket) |
public abstract void tag(FileDescriptor socketDescriptor) throws SocketException
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.SocketExceptionpublic abstract void untag(FileDescriptor socketDescriptor) throws SocketException
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.
SocketExceptionpublic final void tag(Socket socket) throws SocketException
SocketExceptionpublic final void untag(Socket socket) throws SocketException
SocketExceptionpublic static void set(SocketTagger tagger)
tagger.public static SocketTagger get()