httphandler.java

来自「Mina框架http协议简单实现。Mina框架效率与c程序比较接近」· Java 代码 · 共 25 行

JAVA
25
字号
package com.eshore.pubservice.http.handle;

import org.apache.mina.common.IoSession;

import com.eshore.pubservice.http.msg.HttpRequestHead;
import com.eshore.pubservice.http.msg.HttpRequestMsg;
import com.eshore.pubservice.nio.handle.IHandler;
import com.eshore.pubservice.nio.msg.IMsg;

/**
 * Http 请求处理器.
 * 
 * @author lishuisheng
 *
 */
public class HttpHandler implements IHandler {

	public void handle(IoSession session,IMsg msg) {
		HttpRequestMsg message=(HttpRequestMsg)msg;
		HttpRequestHead head=message.getHead();
		System.out.println(head.toString());
	}

}

⌨️ 快捷键说明

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