code: @Override
  	public void messageReceived(IoSession session, Object message)
  			throws Exception {
  		log.debug("{} <-- {}", session, message);
  		if (this.sensorIoAdapter == null) {
  			log.warn(
  					"No SensorIoAdapter defined. Ignoring message from {}: {}",
  					session, message);
  			return;
  		}
  
  		if (message instanceof SampleMessage) {
  			if (this.sensorIoAdapter != null) {
  				this.sensorIoAdapter.sensorSampleReceived(session,
  						(SampleMessage) message);
  			}
  		} else if (message instanceof HandshakeMessage) {
  			log.debug("Received handshake message from {}: {}", session,
  					message);
  			if (this.sensorIoAdapter != null) {
  				this.sensorIoAdapter.handshakeMessageReceived(session,
  						(HandshakeMessage) message);
  			}
  
  		} else {
  			log.warn("Unhandled message type for session {}: {}", session,
  					message);
  		}
  
  	}
docs: Demultiplexes the message type and passes it to the appropriate method of
  the IOAdapter.
  
  @see SensorIoAdapter#sensorSampleReceived(IoSession, SampleMessage)
  @see SensorIoAdapter#handshakeMessageReceived(IoSession, HandshakeMessage)