@Override
	public void run() {
		while(true){
			synchronized (this) {
				while(orderList.isEmpty()){
					try {
						wait();
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
				try {
					obOut.writeObject(orderList.remove(0));
					obOut.flush();
				} catch (IOException e) {
					e.printStackTrace();
					break;
				}
			}
		}
		if(obOut != null){
			try {
				obOut.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}