FileDocCategorySizeDatePackage
PropertyBasedMonitoringSocket_RMIServerSocketFactory.javaAPI DocExample1524Thu Nov 08 00:23:24 GMT 2001com.ora.rmibook.chapter18.sockets

PropertyBasedMonitoringSocket_RMIServerSocketFactory

public class PropertyBasedMonitoringSocket_RMIServerSocketFactory extends Object implements RMIServerSocketFactory

Fields Summary
private static final String
USE_MONITORING_SOCKETS_PROPERTY
private static final String
TRUE
private int
_hashCode
private boolean
_isMonitoringOn
Constructors Summary
public PropertyBasedMonitoringSocket_RMIServerSocketFactory()


      
        String compressionProperty = System.getProperty(USE_MONITORING_SOCKETS_PROPERTY);

        if ((null != compressionProperty) && (compressionProperty.equalsIgnoreCase(TRUE))) {
            _isMonitoringOn = true;
            _hashCode++;
        } else {
            _isMonitoringOn = false;
        }
        return;
    
Methods Summary
public java.net.ServerSocketcreateServerSocket(int port)

        try {
            if (_isMonitoringOn) {
                return new MonitoringServerSocket(port);
            } else {
                return new ServerSocket(port);
            }
        } catch (IOException e) {
        }
        return null;
    
public booleanequals(java.lang.Object object)

        if (object instanceof PropertyBasedMonitoringSocket_RMIServerSocketFactory) {
            return true;
        }
        return false;
    
public inthashCode()

        return _hashCode;