Israel holds all the cards here, not the palestinians. Not hamas. Israel is the party that must step up and provide a real solution. Israel's solution over the past decade has been to contain the palestinians, lock their borders, and knock over their buildings whenever they get too uppity. This policy will never result in a reduction of terrorists. It will never result in removing the conditions that allow hamas to exist.
Imagine if you are a 20 year old gazan (older than the average gazan) and all you know, your entire life, is israeli control of the strip. The death tolls aren't high enough that everyone has a dead family member, but i wouldn't be surprised if everyone knows someone the IDF killed. This is how america created terrorists in the middle east. This is how Israel is creating terrorists in their own backyard. Foreign politicians enforcing their will, through force, upon a people that don't want it.
Hamas isn't long past, the fact is Hamas is not particularly important. Hamas is a symptom, not the problem. If Israel had the will to fix their structural problems, Hamas would have no reason to exist.
Hamas is throwing unguided missles randomly and Israel is hitting them back by leveling buildings. Hamas is no more than a small child throwing a tantrum with no possibility to actually cause a change. All they can do is scream louder and hope someone else will do something. Again, Hamas is not the problem, they are a symptom of Israel's policy regarding palestinians.