ResourceMonitor for the
ResourceMonitoringService#RES_TYPE_SOCKET resource type.
SocketMonitor instance are used to monitor and limit the number of
in-use sockets per ResourceContext instance. SocketMonitor
instance handle all types of sockets (TCP, UDP, ...).
A TCP socket is considered to be in-use when it is bound (
Socket#bind(java.) or when it is connected (
Socket#connect(java.). It leaves the in-use state
when the socket is closed (Socket#close()). *
A UDP socket is in-use when it is bound (
DatagramSocket#bind(java.) or connected (
DatagramSocket#connect(java.). A UDP Socket leaves
the in-use state when it is closed (DatagramSocket#close()).
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: the number of existing socket.Returns the number of existing socket created by a
|
| getSocketUsage | back to summary |
|---|---|
| public long getSocketUsage() Returns the number of existing socket created by a
The
| |