Networking Enhancements in Java SE 8
- A new class
java.net.URLPermission
has been added. URLPermission
represents a permission for accessing a resource (or set
of resources) defined by a given URL, and for a given set of user-settable request methods and
request headers.
-
The
jdk.net
package has been added that contains platform specific
socket options and a mechanism for setting these options on all of the
standard socket types. The socket options are defined in jdk.net.ExtendedSocketOptions
and the first one to be defined is SO_FLOW_SLA
, which is an option for establishing
socket flows for multitennant applications. The class jdk.net.Sockets
provides the mechanism for setting and getting these extended options.
-
In class
HttpURLConnection
, if a security manager is installed, and if a method is called which
results in an attempt to open a connection, the caller must possess either:
If automatic redirection is enabled, and this request is redirected to another destination, then the caller must also have permission to connect to the redirected host/URL.