org.netbeans.api.debugger.jpda/2 2.4.31

org.netbeans.api.debugger.jpda
Class ListeningDICookie

java.lang.Object
  extended by org.netbeans.api.debugger.jpda.AbstractDICookie
      extended by org.netbeans.api.debugger.jpda.ListeningDICookie

public final class ListeningDICookie
extends AbstractDICookie

Listens on given port for some connection of remotely running JDK and returns VirtualMachine for it.

How to use it:

    DebuggerInfo di = DebuggerInfo.create (
        "My First Listening Debugger Info",
        new Object [] {
            ListeningDICookie.create (
                1234
            )
        }
    );
    DebuggerManager.getDebuggerManager ().startDebugging (di);


Field Summary
static String ID
          Public ID used for registration in Meta-inf/debugger.
 
Method Summary
static ListeningDICookie create(int portNumber)
          Creates a new instance of ListeningDICookie for given parameters.
static ListeningDICookie create(com.sun.jdi.connect.ListeningConnector listeningConnector, Map args)
          Creates a new instance of ListeningDICookie for given parameters.
static ListeningDICookie create(String name)
          Creates a new instance of ListeningDICookie for given parameters.
 Map getArgs()
          Returns map of arguments to be used.
 com.sun.jdi.connect.ListeningConnector getListeningConnector()
          Returns instance of ListeningConnector.
 int getPortNumber()
          Returns port number.
 String getSharedMemoryName()
          Returns shared memory block name.
 com.sun.jdi.VirtualMachine getVirtualMachine()
          Creates a new instance of VirtualMachine for this DebuggerInfo Cookie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Public ID used for registration in Meta-inf/debugger.

See Also:
Constant Field Values
Method Detail

create

public static ListeningDICookie create(com.sun.jdi.connect.ListeningConnector listeningConnector,
                                       Map args)
Creates a new instance of ListeningDICookie for given parameters.

Parameters:
listeningConnector - a instance of ListeningConnector
args - arguments to be used
Returns:
a new instance of ListeningDICookie for given parameters

create

public static ListeningDICookie create(int portNumber)
Creates a new instance of ListeningDICookie for given parameters.

Parameters:
portNumber - a number of port to listen on
Returns:
a new instance of ListeningDICookie for given parameters

create

public static ListeningDICookie create(String name)
Creates a new instance of ListeningDICookie for given parameters.

Parameters:
name - a name of shared memory block to listen on
Returns:
a new instance of ListeningDICookie for given parameters

getListeningConnector

public com.sun.jdi.connect.ListeningConnector getListeningConnector()
Returns instance of ListeningConnector.

Returns:
instance of ListeningConnector

getArgs

public Map getArgs()
Returns map of arguments to be used.

Returns:
map of arguments to be used

getPortNumber

public int getPortNumber()
Returns port number.

Returns:
port number

getSharedMemoryName

public String getSharedMemoryName()
Returns shared memory block name.

Returns:
shared memory block name

getVirtualMachine

public com.sun.jdi.VirtualMachine getVirtualMachine()
                                             throws IOException,
                                                    com.sun.jdi.connect.IllegalConnectorArgumentsException
Creates a new instance of VirtualMachine for this DebuggerInfo Cookie.

Specified by:
getVirtualMachine in class AbstractDICookie
Returns:
a new instance of VirtualMachine for this DebuggerInfo Cookie
Throws:
IOException
com.sun.jdi.connect.IllegalConnectorArgumentsException

org.netbeans.api.debugger.jpda/2 2.4.31

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.