public interface SocketMonitor extends ResourceMonitor
SocketMonitorinstance are used to monitor and limit the number of in-use sockets per
SocketMonitorinstance handle all types of sockets (TCP, UDP, ...).
A TCP socket is considered to be in-use when it is bound (
Socket.bind(java.net.SocketAddress)) or when it is connected (
Socket.connect(java.net.SocketAddress)). It leaves the in-use state
when the socket is closed (
A UDP socket is in-use when it is bound (
DatagramSocket.bind(java.net.SocketAddress)) or connected (
DatagramSocket.connect(java.net.SocketAddress)). A UDP Socket leaves
the in-use state when it is closed (
|Modifier and Type||Method and Description|
Returns the number of existing socket created by a
delete, disable, enable, equals, getContext, getMonitoredPeriod, getResourceType, getSamplingPeriod, getUsage, hashCode, isDeleted, isEnabled
ResourceMonitor.getUsage() method returns the same value, wrapped in a long.
Copyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0