java.net
Interface SocketOptions
java.lang.Object
|
+--java.net.SocketOptions
public interface SocketOptions
This interface is used by SocketImpl and
DatagramSocketImpl to implement options
on sockets.
Since:Authors:- Aaron M. Renn (arenn@urbanophile.com)
- Warren Levy <warrenl@cygnus.com>
getOption
public Object getOption(int option_id) Returns the current setting of the specified option. The
Object returned will be an Integer for options
that have integer values. For options that are set to on or off, a
Boolean will be returned. The option_id
is one of the defined constants in this interface.
Parameters:
Returns:
- The current value of the option
Throws:
setOption
public void setOption(int option_id, java.lang.Object val) Sets the specified option on a socket to the passed in object. For
options that take an integer argument, the passed in object is an
Integer. For options that are set to on or off, the
value passed will be a Boolean. The option_id
parameter is one of the defined constants in this interface.
Parameters:
Throws:
SocketImplandDatagramSocketImplto implement options on sockets.