I would like to know are there something already available in Java, which will allow me to
- submit an action
- if action doesn’t match the constraint, then discard the action
- otherwise execute the action
constraint might be: “if the action with the same arguments was executed more than 5 seconds ago”, and action itself “log the message to file” or “send message to the JMS queue”
It’s easy to implement the solution, but I don’t want to reinvent the wheel 🙂
I’m not sure that I fully understand where you are going to use it, or how you are going to use it. But parts of it can be done with Apache Camel.