Package com.tangosol.net
Class SocketOptions
java.lang.Object
com.oracle.coherence.common.net.SocketSettings
com.tangosol.net.SocketOptions
- All Implemented Interfaces:
XmlConfigurable
,SocketOptions
public class SocketOptions
extends com.oracle.coherence.common.net.SocketSettings
implements XmlConfigurable
SocketOptions provides a means to configure the various aspects of Sockets.
Unlike java.net.SocketOptions, unset options will result in a value of
null when queried via getOption.
- Since:
- Coherence 3.6
- Author:
- mf 2010.05.20
-
Field Summary
Fields inherited from class com.oracle.coherence.common.net.SocketSettings
f_mapOptions
Fields inherited from interface java.net.SocketOptions
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_REUSEPORT, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(DatagramSocket socket) Configure the specified socket.void
apply
(MulticastSocket socket) Configure the specified socket.void
apply
(ServerSocket socket) Configure the specified socket.void
Configure the specified socket.static void
apply
(SocketOptions options, DatagramSocket socket) Apply the specified options to a socket.void
apply
(SocketOptions options, MulticastSocket socket) Apply the specified options to a socket.static void
apply
(SocketOptions options, ServerSocket socket) Apply the specified options to a socket.static void
apply
(SocketOptions options, Socket socket) Apply the specified options to a socket.void
copyOptions
(SocketOptions options) Copy the options in the specified SocketOptions into this SocketOptions.Deprecated.boolean
Return true iff the XmlSocketOptions have been configured with any options.static SocketOptions
load
(XmlElement xml) Deprecated.void
setConfig
(XmlElement xml) Deprecated.Methods inherited from class com.oracle.coherence.common.net.SocketSettings
get, getOption, set, setOption, setOptions, toString
-
Field Details
-
m_xml
The configuration.
-
-
Constructor Details
-
SocketOptions
public SocketOptions()
-
-
Method Details
-
isConfigured
public boolean isConfigured()Return true iff the XmlSocketOptions have been configured with any options.- Returns:
- true iff the XmlSocketOptions have been configured with any options.
-
apply
Configure the specified socket.- Parameters:
socket
- the socket to configure- Throws:
SocketException
- if an I/O error occurs
-
apply
Configure the specified socket.- Parameters:
socket
- the socket to configure- Throws:
SocketException
- if an I/O error occurs
-
apply
Configure the specified socket.- Parameters:
socket
- the socket to configure- Throws:
SocketException
- if an I/O error occurs
-
apply
Configure the specified socket.- Parameters:
socket
- the socket to configure- Throws:
SocketException
- if an I/O error occurs
-
getConfig
Deprecated.Determine the current configuration of the object.- Specified by:
getConfig
in interfaceXmlConfigurable
- Returns:
- the XML configuration or null
-
setConfig
Deprecated.Specify the configuration for the object.- Specified by:
setConfig
in interfaceXmlConfigurable
- Parameters:
xml
- the XML configuration for the object
-
copyOptions
Copy the options in the specified SocketOptions into this SocketOptions.- Parameters:
options
- the options to copy- Throws:
SocketException
- if an error occurs
-
load
Deprecated.Parse the supplied XML and return the corresponding SocketOptions.- Parameters:
xml
- the xml configuration- Returns:
- the options, or null if none were identified
-
apply
Apply the specified options to a socket.- Parameters:
options
- the options to applysocket
- the socket to configure- Throws:
SocketException
- if an I/O error occurs
-
apply
Apply the specified options to a socket.- Parameters:
options
- the options to applysocket
- the socket to configure- Throws:
SocketException
- if an I/O error occurs
-
apply
Apply the specified options to a socket.- Parameters:
options
- the options to applysocket
- the socket to configure- Throws:
SocketException
- if an I/O error occurs
-
apply
Apply the specified options to a socket.- Parameters:
options
- the options to applysocket
- the socket to configure- Throws:
SocketException
- if an I/O error occurs
-