log.error(e);
System.err.println(e);
	public void run() {	    this.setName("ReceiverThread");	    while(running) {		try {		    o=channel.receive(0);		    if(o instanceof Message) {			try {			    msg=(Message)o;			    Object tmp=msg.getObject();			    if(!(tmp instanceof TotOrderRequest)) {				log.error("tmp is " + tmp.getClass() + ": " + tmp);				if(tmp instanceof Message) {				    System.out.print("Hdrs are ");				    ((Message)tmp).printObjectHeaders();				}			    }			    req=(TotOrderRequest)tmp;			    processRequest(req);			}			catch(Exception e) {			    log.error(e);			}		    }		    else if(o instanceof GetStateEvent) {			int[][] copy_of_state=canvas.getCopyOfState();			channel.returnState(Util.objectToByteBuffer(copy_of_state));		    }		    else if(o instanceof SetStateEvent) {  // state was received, set it !			set_state_evt=(SetStateEvent)o;			canvas.setState(Util.objectFromByteBuffer(set_state_evt.getArg()));		    } else if (o instanceof View) System.out.println(o.toString());		}		catch(ChannelClosedException closed) {		    error("Channel has been closed; receiver thread quits");		    return;		}		catch(Exception e) {		    error(e.toString());		    return;		}	    }	}