|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.net.SocketOptions
public class SocketOptions
SocketOptions provides a means to configure the various aspects of Sockets.
| Field Summary | |
|---|---|
protected Map |
m_mapOptionsA map of the specified options. |
protected XmlElement |
m_xmlThe configuration. |
| 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_SNDBUF, SO_TIMEOUT, TCP_NODELAY |
| Constructor Summary | |
|---|---|
SocketOptions() |
|
| Method Summary | |
|---|---|
void |
apply(DatagramSocket socket)Configure the specified socket. |
void |
apply(MulticastSocket socket)Configure the specified socket. |
void |
apply(ServerSocket socket)Configure the specified socket. |
void |
apply(Socket socket)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. |
XmlElement |
getConfig()Determine the current configuration of the object. |
Object |
getOption(int optID) |
boolean |
isConfigured()Return true iff the XmlSocketOptions have been configured with any options. |
static SocketOptions |
load(XmlElement xml)Parse the supplied XML and return the corresponding SocketOptions. |
void |
setConfig(XmlElement xml)Specify the configuration for the object. |
void |
setOption(int optID, Object value) |
String |
toString() |
protected static void |
warnBufferSize(Object socket, String sBuffer, int cb, int cbReal)Issue a warning regarding an undersized socket buffer. |
| Field Detail |
|---|
protected XmlElement m_xml
protected Map m_mapOptions
| Constructor Detail |
|---|
public SocketOptions()
| Method Detail |
|---|
public boolean isConfigured()
public void apply(ServerSocket socket)
throws SocketException
socket - the socket to configureSocketException - if an I/O error occurs
public void apply(Socket socket)
throws SocketException
socket - the socket to configureSocketException - if an I/O error occurs
public void apply(DatagramSocket socket)
throws SocketException
socket - the socket to configureSocketException - if an I/O error occurs
public void apply(MulticastSocket socket)
throws SocketException
socket - the socket to configureSocketException - if an I/O error occurspublic XmlElement getConfig()
getConfig in interface XmlConfigurablepublic void setConfig(XmlElement xml)
setConfig in interface XmlConfigurablexml - the XML configuration for the object
public void setOption(int optID,
Object value)
throws SocketException
setOption in interface SocketOptionsSocketException
public Object getOption(int optID)
throws SocketException
getOption in interface SocketOptionsSocketExceptionpublic String toString()
protected static void warnBufferSize(Object socket,
String sBuffer,
int cb,
int cbReal)
socket - the socketsBuffer - the buffer descriptioncb - the requested sizecbReal - the actual sizepublic static SocketOptions load(XmlElement xml)
xml - the xml configuraiton
public static void apply(SocketOptions options,
ServerSocket socket)
throws SocketException
options - the options to applysocket - the socket to configureSocketException - if an I/O error occurs
public static void apply(SocketOptions options,
Socket socket)
throws SocketException
options - the options to applysocket - the socket to configureSocketException - if an I/O error occurs
public static void apply(SocketOptions options,
DatagramSocket socket)
throws SocketException
options - the options to applysocket - the socket to configureSocketException - if an I/O error occurs
public void apply(SocketOptions options,
MulticastSocket socket)
throws SocketException
options - the options to applysocket - the socket to configureSocketException - if an I/O error occurs
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||