checkConnect
Method in class java.lang.SecurityManager
public void checkConnect(String host, int port)
- Throws a
SecurityExceptionif the calling thread is not allowed to open a socket connection to the specified host and port number.A port number of
-1indicates that the calling method is attempting to determine the IP address of the specified host name.This method calls
checkPermissionwith theSocketPermission(host+":"+port,"connect")permission if the port is not equal to -1. If the port is equal to -1, then it callscheckPermissionwith theSocketPermission(host,"resolve")permission.If you override this method, then you should make a call to
super.checkConnectat the point the overridden method would normally throw an exception.- Parameters:
host- the host name port to connect to.port- the protocol port to connect to.- Throws:
- SecurityException - if the calling thread does not have permission to open a socket connection to the specified
hostandport. - See Also:
checkPermission
Karen Cioni Joven <[EMAIL PROTECTED]> wrote:
Gente, preciso de ajuda... Algu�m sabe explicar exatamente como funciona o m�todo abaixo?
public void checkConnect (String host, int port)
obrigada,
Karen
* A. Sergio F. Bonato
* Oracle DBA
* S.A. O Estado de S.Paulo - S.Paulo - Brasil
* FONE: +55-11-3856-5116
* FAX: +55-11-3856-4679
* E-MAIL: [EMAIL PROTECTED]; [EMAIL PROTECTED]
* CELULAR: 011-9720-6560
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
