If it is whiny, rude talking/behavior when it first starts I address it simply saying "I do not understand or listen to this type of behavior, it is inappropriate" and if my daughter continues I say "you will stop that now otherwise you will go to your room till you apologize and can behave/act/talk respectably." At that point my daughter will either stomp to her room, or change her attitude/behavior. She can do whatever in her room, as long as she stays there till she apologizes and no longer has fowl behavior/attitude. Now I started this when she was 3 years old, she will be 5 years old in two months and it finally seems to be taking (within a minute or two she apologizes for her behavior and is joyful to be around again).
I guess I say I ignore the issue but I do address it first, sent to room second till apolizes & changes, while in her room I do ignore it. Othertimes when she is demanding something instead of asking for it polietly I will give her a blank stare, if she does not get the hint I say I believe you are missing something or trying asking again correctly.