The checkConnect method of the StandardSecurityManager Class contains the following signatures:
checkConnect(String host, int port)
checkConnect(String host, int port, Object context)
Determines whether classes within the current execution context, based on the call stack of the current thread, can open a socket connection to the specified host on the specified port.
public synchronized void checkConnect(String host, int port);
host | The host. |
port | The port. |
The check succeeds only if all the classes found on the call stack possess NetIOPermissions, and if those permissions allow connections to the specified host and port. This method overrides the java.lang.SecurityManager.checkConnect(String,int) method.
SecurityException if the security check fails.
Determines whether classes within the current execution context, based on the call stack of the current thread, can open a socket connection to the specified host on the specified port. This method overrides the java.lang.SecurityManager.checkConnect(String,int) method.
public void checkConnect(String host, int port, Object context);
Note The context parameter is ignored, and this method simply forwards the check to the checkConnect(String host,int port) method.
host | The host. |
port | The port. |
context | This parameter is ignored. |
SecurityException if the security check fails.