hi i was wondering how can i do to get a shared event in java let me explain to u what i want to do
first i got a Controller class all it methods are static
class TrafficController {
public static void controlTraffic() {
// does something //>> i want to Notify that this action was done }
}
in the other side i got a Listener
class TrafficListener{
public static void watchNewTraffic()
{ //does something when new traffic appears } }
have any one any idea how can i deal with it
i have found that there is Observer and Observable but i need to implement method of Observer also i have found Propertychangelistener which are useless in my case because i have static methods