public synchronized void sendObject(Object obj){
		//int num = 33;
		Object test;
		
	        	try {
					setObjectOutStream(obj);
					//wait(1000);
					test = getObjectInStream();
					if(test instanceof Integer){
						int message = (int) test;
						if(message == 1){
							System.out.println("client received");
							out.reset();
							if(obj instanceof ArrayBlockingQueue){
								((ArrayBlockingQueue<Object>) obj).remove();
							}
							
						}
					}
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}// catch (InterruptedException e) {
					// TODO Auto-generated catch block
				//	e.printStackTrace();
				//} 
	        	catch (ClassNotFoundException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
	        	
	        	
	        }