Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.ide.debug
Class ServerConnector  view ServerConnector download ServerConnector.java

java.lang.Object
  extended byjavax.ide.debug.Connector
      extended byjavax.ide.debug.ServerConnector

public abstract class ServerConnector
extends Connector

ServerConnectors allow clients to start the debugger listening by calling the method startListening() 55 waiting for a debuggee process to start. The debugge process can be started by the extension or the IDE. When the debuggee process is launched, the listening debugger will automatically accept the connection. IDE providers must provide an implementation of this interface. Extension writers can access the Connector through the Debugger.getServerConnector(javax.ide.command.Context) 55 method.


Field Summary
private  boolean _isListening
           
 
Fields inherited from class javax.ide.debug.Connector
OPTION_CLASSPATH, OPTION_DEBUG_FIRST, OPTION_DEBUG_LAST, OPTION_JAVA_EXECUTABLE, OPTION_JAVA_OPTIONS, OPTION_JVM, OPTION_MAIN_CLASS, OPTION_PROGRAM_ARGUMENTS
 
Constructor Summary
ServerConnector()
           
 
Method Summary
 boolean isListening()
          Check if the debugger is listening for a debuggee connection.
 void startListening()
          Tell the debugger to start listening for and accept a connection from a debuggee.
protected abstract  void startListeningImpl()
           
 void stopListening()
          Tell the listening debugger to stop listening.
protected abstract  void stopListeningImpl()
           
 
Methods inherited from class javax.ide.debug.Connector
getContext, getOptions, isConnected, isFinished, startDebuggee
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_isListening

private boolean _isListening
Constructor Detail

ServerConnector

public ServerConnector()
Method Detail

startListening

public final void startListening()
                          throws java.io.IOException
Tell the debugger to start listening for and accept a connection from a debuggee. This method will return after the debugger starts listening, but before it actually accepts a connection. (The debugger will create and start a new thread to accept the connection). After the debugger accepts a connection, it will automatically stop listening for subsequent connections. After calling this method, the extension writer should either start the debuggee process or tell the IDE to do so by calling Connector.startDebuggee(java.util.Map) 55 . To tell the debugger to stop listening before it accepts a connection, (for example, if the extension was unable to start the debuggee process successfully), the extension should call stopListening() 55 . If this ServerConnector has already accepted a connection (and has automatically stopped listening), it may or may not be able to start listening again. If it does not support listening for another connection, this method will throw UnsupportedOperationException.


startListeningImpl

protected abstract void startListeningImpl()
                                    throws java.io.IOException

isListening

public final boolean isListening()
Check if the debugger is listening for a debuggee connection.


stopListening

public final void stopListening()
Tell the listening debugger to stop listening.


stopListeningImpl

protected abstract void stopListeningImpl()