Class TimeoutSocketFactory

  • All Implemented Interfaces:
    RMIClientSocketFactory, RMIServerSocketFactory

    public class TimeoutSocketFactory
    extends RMISocketFactory
    The TimeoutSocketFactory is a wrapper around the default RMISocketFactory that allows to set timeouts for the created sockets. This is required because RMI sockets have large default values for connect or read timeouts. During remote-method-guesser's scan operation, this is not desired.
    Author:
    Tobias Neitzel (@qtc_de)
    • Constructor Detail

      • TimeoutSocketFactory

        public TimeoutSocketFactory​(int readTimeout,
                                    int connectTimeout)
        Create a new factory using the specified read and connect timeout for TCP sockets.
        Parameters:
        readTimeout - timeout for read operations on the socket
        connectTimeout - timeout for the initial socket connect