org.apache.bsf.debug.meta

Class DebugManagerStub

public class DebugManagerStub extends Stub implements BSFDebugManager

Field Summary
protected VectorfEngines
Constructor Summary
DebugManagerStub(SocketConnection con)
Method Summary
voiddisconnectNotify(Exception ex)
A communication error occured, simply disconnect and therefore clean everything up.
StringgetLangFromFilename(String fileName)
Determine the language of a script file by looking at the file extension.
booleanisLanguageRegistered(String lang)
Determine whether a language is registered.
voidplaceBreakpointAtLine(int bpid, String docname, int lineno)
Breakpoints are placed within documents either at a specific line or offset.
voidplaceBreakpointAtOffset(int bpid, String docname, int offset)
voidregisterDebugger(String lang, BSFDebugger debugger)
Register a debugger for a scripting engine.
voidremoveBreakpoint(String docname, int bpid)
Allows to remove a breakpoint.
voidsendQuitNotice()
voidsetEntryExit(String docname, boolean on)
Allows setting entry/exit mode
booleansupportBreakpointAtLine(String lang)
booleansupportBreakpointAtOffset(String lang)
Allows a debugger to ask if the engine for a given language will support either line or offset breakpoints.
voidunregisterDebugger(String lang)

Field Detail

fEngines

protected Vector fEngines

Constructor Detail

DebugManagerStub

public DebugManagerStub(SocketConnection con)

Method Detail

disconnectNotify

public void disconnectNotify(Exception ex)
A communication error occured, simply disconnect and therefore clean everything up.

getLangFromFilename

public String getLangFromFilename(String fileName)
Determine the language of a script file by looking at the file extension.

Parameters: filename the name of the file

Returns: the scripting language the file is in if the file extension is known to me (must have been registered via registerScriptingEngine).

Throws: RemoteException if file's extension is unknown.

isLanguageRegistered

public boolean isLanguageRegistered(String lang)
Determine whether a language is registered.

Parameters: lang string identifying a language

Returns: true iff it is

placeBreakpointAtLine

public void placeBreakpointAtLine(int bpid, String docname, int lineno)
Breakpoints are placed within documents either at a specific line or offset. While breakpoints can be set at lines and offsets in the same document, there is no conversions between lines and offsets. Some engines may support only offsets or only lines and therefore some breakpoints may be ignored. Placing a breakpoint is local to a debugger connection. In other words, breakpoints set by other debuggers are not visible to a given debugger. Breakpoints are given identifiers so to make easier for debuggers to manipulate breakpoints. Identifiers are allocated by the debugger; they must be unique for the entire session between that debugger and the debug manager.

placeBreakpointAtOffset

public void placeBreakpointAtOffset(int bpid, String docname, int offset)

registerDebugger

public void registerDebugger(String lang, BSFDebugger debugger)
Register a debugger for a scripting engine.

Parameters: lang string identifying language

Throws: RemoteException if the language is unknown (i.e., if it has not been registered) with a reason of REASON_UNKNOWN_LANGUAGE. If the language is known but if the interface can't be created for some reason, then the reason is set to REASON_OTHER_ERROR and the actual exception is passed on as well.

removeBreakpoint

public void removeBreakpoint(String docname, int bpid)
Allows to remove a breakpoint.

sendQuitNotice

public void sendQuitNotice()

setEntryExit

public void setEntryExit(String docname, boolean on)
Allows setting entry/exit mode

supportBreakpointAtLine

public boolean supportBreakpointAtLine(String lang)

supportBreakpointAtOffset

public boolean supportBreakpointAtOffset(String lang)
Allows a debugger to ask if the engine for a given language will support either line or offset breakpoints. Note: this will most likely provoke the loading of the engine.

unregisterDebugger

public void unregisterDebugger(String lang)