|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.debugger.JDWPListener
public abstract class JDWPListener
A JDWPListener receives and processes JDWP requests from a remote debugger entity on behalf of a local debugger entity. The JDWPListener manages a JDWPConnection used to communicate with the remote entity.
Nested Class Summary | |
---|---|
static class |
JDWPListener.CommandSet
The implementation of each JDWP Command Set subclasses this class. |
static class |
JDWPListener.QuitException
A QuitException is thrown by #waitForCommand and #waitForReply
if this listener quits before receving the relevant packet. |
Field Summary | |
---|---|
protected JDWPListener |
otherHost
The connection to the other host participating in a network connection that is being proxied. |
Constructor Summary | |
---|---|
JDWPListener()
Creats a JDWPListener. |
Method Summary | |
---|---|
void |
bindProxyPeer(JDWPListener p)
Binds this connection with the connection to the other host participating in a proxied JDWP/SDWP debug session. |
PacketInputStream |
getInputStreamFor(CommandPacket command)
Get the input stream from a command packet (sniffer needs to wrap input stream. |
boolean |
hasQuit()
Determines if this listener has quit. |
void |
open(String url,
byte[] handshake,
boolean initiate,
boolean isJDB,
Runnable delayer)
Opens the connection used by this listener and performs a handshake with the remote host once the connection has been established. |
protected abstract void |
processCommand(CommandPacket command)
Processes a single command received over this listeners connection. |
boolean |
quit()
Stops this listener's run loop |
void |
run()
When an object implementing interface Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
ReplyPacket |
sendCommand(CommandPacket command)
Sends a command packet over this connection. |
void |
sendReply(ReplyPacket reply)
|
abstract String |
sourceName()
Subclasses must return a meaning name for this listener that will be useful as a suffix for log messages on this thread. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JDWPListener otherHost
Constructor Detail |
---|
public JDWPListener()
Method Detail |
---|
public void bindProxyPeer(JDWPListener p)
p
- the connection to the other hostpublic void open(String url, byte[] handshake, boolean initiate, boolean isJDB, Runnable delayer) throws IOException
url
- the URL for opening the connectionhandshake
- an array of bytes that must be exchanged in each
direction to complete a handshakeinitiate
- true if the handshake is to be intiated by this hostisJDB
- delayer
- code to run after connection but before handshake
IOException
- if the connection could not be opened or if the handshake was not successfulprotected abstract void processCommand(CommandPacket command) throws IOException
command
-
IOException
public final void run()
Runnable
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
The general contract of the method run
is that it may
take any action whatsoever.
run
in interface Runnable
Thread.run()
public final ReplyPacket sendCommand(CommandPacket command) throws IOException, SDWPException
command
- the command packet to send
IOException
- if there was an IO error while sending the packet
IllegalStateException
- if called before the listener has set up a connection and waited for connection to be ready for packets.
SDWPException
- if the received reply has a non-zero error codepublic final void sendReply(ReplyPacket reply) throws IOException
IOException
public boolean quit()
public boolean hasQuit()
public abstract String sourceName()
public PacketInputStream getInputStreamFor(CommandPacket command)
command
- packet to read from
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |