//TODO: actually implement barrier contract
@Override
	    void processOFMessage(ControllerChannelHandler h, OFMessage m)
		    throws IOException {
		switch (m.getType()) {
		    case HELLO:
			processOFHello(h, (OFHello) m);
			break;    
		    case ECHO_REPLY:
			break;
		    case ECHO_REQUEST:
			processOFEchoRequest(h, (OFEchoRequest) m);
			break;
		    case FEATURES_REQUEST:
			processOFFeaturesRequest(h, (OFFeaturesRequest) m);
			break;
		    case BARRIER_REQUEST:
			//TODO: actually implement barrier contract
			OFBarrierReply breply = new OFBarrierReply();
			breply.setXid(m.getXid());
			h.channel.write(Collections.singletonList(breply));
			break;
		    case SET_CONFIG:
		    case ERROR:
		    case PACKET_OUT:
		    case PORT_MOD:
		    case QUEUE_GET_CONFIG_REQUEST:
		    case STATS_REQUEST:    
		    case FLOW_MOD:
		    case GET_CONFIG_REQUEST:
			h.sw.handleIO(m);
			break;
		    case VENDOR:
			unhandledMessageReceived(h, m);
			break;
		    case FEATURES_REPLY:
		    case FLOW_REMOVED:
		    case PACKET_IN:
		    case PORT_STATUS:
		    case BARRIER_REPLY:
		    case GET_CONFIG_REPLY:
		    case STATS_REPLY:
		    case QUEUE_GET_CONFIG_REPLY:
			illegalMessageReceived(h, m);
			break;
		}
	    }
break;
case BARRIER_REQUEST:
//TODO: actually implement barrier contract
OFBarrierReply breply = new OFBarrierReply();
breply.setXid(m.getXid());
break;
case ECHO_REPLY:
break;
case ECHO_REQUEST:
processOFEchoRequest(h, (OFEchoRequest) m);
break;
case FEATURES_REQUEST:
processOFFeaturesRequest(h, (OFFeaturesRequest) m);
break;
case BARRIER_REQUEST:
//TODO: actually implement barrier contract
OFBarrierReply breply = new OFBarrierReply();
breply.setXid(m.getXid());
h.channel.write(Collections.singletonList(breply));
break;
case SET_CONFIG:
case ERROR:
case PACKET_OUT:
case PORT_MOD:
case QUEUE_GET_CONFIG_REQUEST:
case STATS_REQUEST:
@Override
void processOFMessage(ControllerChannelHandler h, OFMessage m)
throws IOException {
switch (m.getType()) {
case HELLO:
processOFHello(h, (OFHello) m);
break;
case ECHO_REPLY:
break;
case ECHO_REQUEST:
processOFEchoRequest(h, (OFEchoRequest) m);
break;
case FEATURES_REQUEST:
processOFFeaturesRequest(h, (OFFeaturesRequest) m);
break;
case BARRIER_REQUEST:
//TODO: actually implement barrier contract
OFBarrierReply breply = new OFBarrierReply();
breply.setXid(m.getXid());
h.channel.write(Collections.singletonList(breply));
break;
case SET_CONFIG:
case ERROR:
case PACKET_OUT:
case PORT_MOD:
case QUEUE_GET_CONFIG_REQUEST:
case STATS_REQUEST:
case FLOW_MOD:
case GET_CONFIG_REQUEST:
h.sw.handleIO(m);
break;
case VENDOR:
unhandledMessageReceived(h, m);
break;
case FEATURES_REPLY:
case FLOW_REMOVED:
case PACKET_IN: