SecurityManager.checkConnect
Class Overview | Class Members | 
  This Package | 
All Packages
 public void checkConnect( String host,
                          int port )
Parameters
-  host 
-  the host name port to connect to.
    
-  port 
-  the protocol port to connect to.
    
Description
 Throws a SecurityException if the 
 calling thread is not allowed to open a socket connection to the 
 specified host and port number. 
 
 A port number of -1 indicates that the calling 
 method is attempting to determine the IP address of the specified 
 host name. 
 
 The checkConnect method for class 
 SecurityManager always throws a 
 SecurityException.
  
Exceptions
 SecurityException
     if the caller does not have permission
               to open a socket connection to the specified
               host and port.
  
 public void checkConnect( String host,
                          int port,
                          Object context )
Parameters
-  host 
-  the host name port to connect to.
    
-  port 
-  the protocol port to connect to.
    
-  context 
-  a system-dependent security context.
    
Description
 Throws a SecurityException if the 
 specified security context is not allowed to open a socket 
 connection to the specified host and port number. 
 
 A port number of -1 indicates that the calling 
 method is attempting to determine the IP address of the specified 
 host name. 
 
 The checkConnect method for class 
 SecurityManager always throws a 
 SecurityException.
  
Exceptions
 SecurityException
     if the specified security context does
               not have permission to open a socket connection to the
               specified host and port.
    
See Also
     getSecurityContext