Methods Summary |
---|
public abstract java.net.Socket | acceptSocket(java.net.ServerSocket socket)Wrapper function for accept(). This allows us to trap and
translate exceptions if necessary
|
public abstract java.net.ServerSocket | createSocket(int port)Returns a server socket which uses all network interfaces on
the host, and is bound to a the specified port. The socket is
configured with the socket options (such as accept timeout)
given to this factory.
|
public abstract java.net.ServerSocket | createSocket(int port, int backlog)Returns a server socket which uses all network interfaces on
the host, is bound to a the specified port, and uses the
specified connection backlog. The socket is configured with
the socket options (such as accept timeout) given to this factory.
|
public abstract java.net.ServerSocket | createSocket(int port, int backlog, java.net.InetAddress ifAddress)Returns a server socket which uses only the specified network
interface on the local host, is bound to a the specified port,
and uses the specified connection backlog. The socket is configured
with the socket options (such as accept timeout) given to this factory.
|
public static synchronized org.apache.tomcat.util.net.ServerSocketFactory | getDefault()Returns a copy of the environment's default socket factory.
//
// optimize typical case: no synch needed
//
if (theFactory == null) {
//
// Different implementations of this method could
// work rather differently. For example, driving
// this from a system property, or using a different
// implementation than JavaSoft's.
//
theFactory = new DefaultServerSocketFactory ();
}
try {
return (ServerSocketFactory) theFactory.clone ();
} catch (CloneNotSupportedException e) {
throw new RuntimeException (e.getMessage ());
}
|
public javax.net.ssl.SSLContext | getSSLContext()Return the SSLContext required when implementing SSL over
NIO non-blocking.
return context;
|
public abstract void | handshake(java.net.Socket sock)Extra function to initiate the handshake. Sometimes necessary
for SSL
|
public abstract void | init()
|
public void | initSocket(java.net.Socket s)
|
public void | setAttribute(java.lang.String name, java.lang.Object value)General mechanism to pass attributes from the
ServerConnector to the socket factory.
Note that the "prefered" mechanism is to
use bean setters and explicit methods, but
this allows easy configuration via server.xml
or simple Properties
if( name!=null && value !=null)
attributes.put( name, value );
|