checkConnect
Method in class java.lang.SecurityManager
public void checkConnect(String host, int port)
- 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.This method calls
checkPermission
with theSocketPermission(host+":"+port,"connect")
permission if the port is not equal to -1. If the port is equal to -1, then it callscheckPermission
with theSocketPermission(host,"resolve")
permission.If you override this method, then you should make a call to
super.checkConnect
at 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
host
andport
. - 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!