JavaScript Development Tools
Release 3.2

org.eclipse.wst.jsdt.debug.core.jsdi.connect
Class SocketUtil

java.lang.Object
  extended by org.eclipse.wst.jsdt.debug.core.jsdi.connect.SocketUtil

public final class SocketUtil
extends Object

Utility class to find a port to debug on.

Since:
1.0
Restriction:
This class is not intended to be instantiated by clients.

Method Summary
static int findFreePort()
          Returns a free port number on localhost, or -1 if unable to find a free port.
static String findFreePortString()
          Returns a free port number encoded as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findFreePort

public static int findFreePort()
Returns a free port number on localhost, or -1 if unable to find a free port.

Returns:
a free port number on localhost, or -1 if unable to find a free port

findFreePortString

public static String findFreePortString()
Returns a free port number encoded as a string

Returns:
a free port number encoded as a string

JavaScript Development Tools
Release 3.2

Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.