use of com.cas.circuit.ConnectionHandler in project TeachingInSimulation by ScOrPiOzzy.
the class LinkMsgHandler method execute.
@Override
public void execute(Client client, Message m) {
LinkerMsg respMsg = (LinkerMsg) m;
Nifty nifty = Dispatcher.getIns().getNifty();
ScreenController screenCtrl = nifty.getCurrentScreen().getScreenController();
if (screenCtrl instanceof IConnectScreenControl) {
ConnectionHandler handler = ((IConnectScreenControl) screenCtrl).getConnectionHandler();
byte type = respMsg.getType();
if (LinkerMsg.ADD_LINKER == type) {
handler.connectByOnlineMsg(respMsg);
} else if (LinkerMsg.DELETE_LINKER == type || LinkerMsg.DELETE_SINGLE_TARGET == type) {
handler.onlineDeleteLinker(respMsg, type);
} else if (LinkerMsg.MARK_LINKER == type) {
handler.onlineMark(respMsg);
}
}
}
Aggregations