public void run()
	{
        try
        {    
            // reader for incoming messages initialization
            ObjectInputStream objIn = new ObjectInputStream(clientSocket.getInputStream());
            // wait for a request
            CAMessage received = (CAMessage)objIn.readObject();
            
            OpCode code = received.getOpCode();
            
            if (code.equals(OpCode.INITIALIZATION_REQUEST))
			{
				handleInitRequest((InitRequest)received);
				objIn.close();
			}
			/*else if (code.equals(OpCode.BOOTLIST_REQUEST))
			{
				//handleBootlistRequest((BootlistRequest)received);
				System.err.println("Operation unsupported");
			}*/
			else if (code.equals(OpCode.CA_KEY_REQUEST))
			{
				handleCAKeyRequest((CAKeyRequest)received);
				objIn.close();
			}
			else
			{
				System.err.println("Unknown message type");
				//System.exit(0);
				return;
			};
        }
        catch (ClassCastException cce)
        {
        	System.err.println("CAThread: received a corrupted message");
        	//TODO: send error message response
        }
        catch (Exception e)
        {
            System.err.println("CAThread: Error!");
            e.printStackTrace();
          //TODO: send error message response
        }		
	}