sendmsgtoallaction.java

来自「flex实现的前台」· Java 代码 · 共 33 行

JAVA
33
字号
/**
 * 
 */
package cn.humanmonth.chat.server.protocol.requestaction;

import cn.humanmonth.chat.server.domain.RequestData;
import cn.humanmonth.chat.server.protocol.Protocol;
import cn.humanmonth.chat.server.protocol.RequestAction;
import cn.humanmonth.chat.server.protocol.response.SendMsgToAll;

/**
 * @author linzl
 * 
 */
public class SendMsgToAllAction implements RequestAction {
	private static String action = "sendMsgToAll";
	private SendMsgToAll sendMsgToAll = new SendMsgToAll();

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.humanmonth.home.chat.server.protocol.Action#dealReqeust(cn.humanmonth.home.chat.server.domain.RequestData)
	 */
	public void dealReqeust(RequestData requestData, Protocol protocol) {
		sendMsgToAll.sendMsgToAll(requestData, protocol);
	}

	public boolean canDeal(RequestData requestData) {
		return requestData.getCAction().indexOf(action) != -1;
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?