java.lang.Object
jdk.net.SocketFlow
@Deprecated(since="14", forRemoval=true) public class SocketFlow extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
This is supported only on Solaris. Due to deprecation
of Solaris port, this feature is also deprecated.
Represents the service level properties for the platform specific socket
option
ExtendedSocketOptions.SO_FLOW_SLA
.
The priority and bandwidth parameters must be set before setting the socket option.
When the SO_FLOW_SLA
option is set then it may not take effect
immediately. If the value of the socket option is obtained with
getOption()
then the status may be returned as INPROGRESS
until it takes effect. The priority and bandwidth values are only valid when
the status is returned as OK.
When a security manager is installed, a NetworkPermission
is required to set or get this option.
- Since:
- 1.8
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SocketFlow.Status
Deprecated, for removal: This API element is subject to removal in a future version.This is supported only on Solaris. -
Field Summary
Fields Modifier and Type Field Description static int
HIGH_PRIORITY
Deprecated, for removal: This API element is subject to removal in a future version.static int
NORMAL_PRIORITY
Deprecated, for removal: This API element is subject to removal in a future version.static int
UNSET
Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and Type Method Description long
bandwidth()
Deprecated, for removal: This API element is subject to removal in a future version.Returns this SocketFlow's bandwidth.SocketFlow
bandwidth(long bandwidth)
Deprecated, for removal: This API element is subject to removal in a future version.Sets this SocketFlow's bandwidth.static SocketFlow
create()
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new SocketFlow that can be used to set the SO_FLOW_SLA socket option and create a socket flow.int
priority()
Deprecated, for removal: This API element is subject to removal in a future version.Returns this SocketFlow's priority.SocketFlow
priority(int priority)
Deprecated, for removal: This API element is subject to removal in a future version.Sets this SocketFlow's priority.SocketFlow.Status
status()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the Status value of this SocketFlow.
-
Field Details
-
UNSET
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
NORMAL_PRIORITY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
HIGH_PRIORITY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
-
Method Details
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new SocketFlow that can be used to set the SO_FLOW_SLA socket option and create a socket flow. -
priority
Deprecated, for removal: This API element is subject to removal in a future version.Sets this SocketFlow's priority. Must be either NORMAL_PRIORITY HIGH_PRIORITY. If not set, a flow's priority is normal.- Throws:
IllegalArgumentException
- if priority is not NORMAL_PRIORITY or HIGH_PRIORITY.
-
bandwidth
Deprecated, for removal: This API element is subject to removal in a future version.Sets this SocketFlow's bandwidth. Must be greater than or equal to zero. A value of zero drops all packets for the socket.- Throws:
IllegalArgumentException
- if bandwidth is less than zero.
-
priority
public int priority()Deprecated, for removal: This API element is subject to removal in a future version.Returns this SocketFlow's priority. -
bandwidth
public long bandwidth()Deprecated, for removal: This API element is subject to removal in a future version.Returns this SocketFlow's bandwidth.- Returns:
- this SocketFlow's bandwidth, or
-1
if status is not OK.
-
status
Deprecated, for removal: This API element is subject to removal in a future version.Returns the Status value of this SocketFlow. NO_STATUS is returned if the object was not used in a call to set or get the option.
-