When faced with rude behavior you must maintain your poise. You no longer have to be amiable and warm. It is fine to be curt and remove yourself from the situation. Try to do so with as much grace as possible, and without causing a scene which might embarrass the people you are with. If you have clearly been slighted or recieved negative attention it will be evident to your companions and they will admire the way you handle the circumstances.
Your best revenge will be to bounce back and enjoy yourself!