public void process(SelectionKey selectionKey){
		log.info(this+"in:"+selectionKey.readyOps());
		switch (selectionKey.readyOps()){
			case SelectionKey.OP_ACCEPT:
				ServerSocketChannel serverSocketChannel = (ServerSocketChannel) selectionKey.channel();  
				try {
					SocketChannel socketChannel = serverSocketChannel.accept();
					log.info(""+socketChannel);
					if(socketChannel!=null){
						socketChannel.configureBlocking(false);
						// 立即注册一个 OP_READ 的SelectionKey, 接收客户端的消息  
						socketChannel.register(selector, SelectionKey.OP_READ); 
						log.info(this+" OP_ACCEPT:"+socketChannel.socket().getInetAddress().getHostAddress());
					}
				} catch (IOException e) {
					e.printStackTrace();
				}  
				break;
			case SelectionKey.OP_READ:
				// 有消息进来  
				ByteBuffer byteBuffer = ByteBuffer.allocate(100);  
				SocketChannel socketChannel = (SocketChannel) selectionKey.channel();  
				log.info(this+" host:"+socketChannel);
				try {  
					socketChannel.read(byteBuffer);
					byteBuffer.flip();
				    while (byteBuffer.hasRemaining()) {  
				    	decode(byteBuffer,socketChannel);
					    byteBuffer.clear();
				    	socketChannel.read(byteBuffer);
				    	byteBuffer.flip();
				    }
				    
			    	// 输入结束，关闭 socketChannel  
			    	socketChannel.close();
				} catch (Exception e) {  
					// 如果read抛出异常，表示连接异常中断，需要关闭 socketChannel  
				    e.printStackTrace();  
				    try {
						socketChannel.close();
					} catch (IOException e1) {
						e1.printStackTrace();
					}  
				}
				break;
			default:
				log.error("unhandled " + selectionKey.readyOps());
	            break;
		}
	}