public class VMDebugClientHandler extends Object implements DebugClientHandler
VMDebugSession
The Debug Session class will be used to hold context for each client.
Each client will get its own instance of debug session.Modifier and Type | Method and Description |
---|---|
void |
addWorkerContext(WorkerExecutionContext ctx)
Called when adding a context.
|
void |
clearChannel()
Method to remove web socket channel.
|
Map<String,WorkerExecutionContext> |
getAllWorkerContexts()
Method to get all worker contexts.
|
WorkerExecutionContext |
getWorkerContext(String workerId)
Method to get worker context given the workerId.
|
boolean |
isChannelActive()
Method to check whether channel is active or not.
|
void |
notifyExit()
Called when main program exit.
|
void |
notifyHalt(MessageDTO message)
Called when executor hits a break point.
|
void |
sendCustomMsg(MessageDTO message)
Send a custom message to the client.
|
void |
setChannel(io.netty.channel.Channel channel)
Method to set web socket channel required for communication.
|
public void addWorkerContext(WorkerExecutionContext ctx)
DebugClientHandler
addWorkerContext
in interface DebugClientHandler
ctx
- to be added to the map.public WorkerExecutionContext getWorkerContext(String workerId)
DebugClientHandler
getWorkerContext
in interface DebugClientHandler
workerId
- of the thread.public Map<String,WorkerExecutionContext> getAllWorkerContexts()
DebugClientHandler
getAllWorkerContexts
in interface DebugClientHandler
public void setChannel(io.netty.channel.Channel channel) throws DebugException
DebugClientHandler
setChannel
in interface DebugClientHandler
channel
- required for communication.DebugException
- in case of failure.public void clearChannel()
DebugClientHandler
clearChannel
in interface DebugClientHandler
public boolean isChannelActive()
DebugClientHandler
isChannelActive
in interface DebugClientHandler
public void notifyExit()
DebugClientHandler
notifyExit
in interface DebugClientHandler
public void notifyHalt(MessageDTO message)
DebugClientHandler
notifyHalt
in interface DebugClientHandler
message
- to send to the client.public void sendCustomMsg(MessageDTO message)
DebugClientHandler
sendCustomMsg
in interface DebugClientHandler
message
- message to send to the clientCopyright © 2018 WSO2. All rights reserved.