com.peersafe.base.client.pubsub.CallbackContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chainsql Show documentation
Show all versions of chainsql Show documentation
ChainSQL JAVA API is an api for chainsql server
The newest version!
package com.peersafe.base.client.pubsub;
public abstract class CallbackContext {
public void execute(Runnable runnable) {
runnable.run();
}
// TODO: perhaps this interface/class/concept
// can be expanded (and subsequently renamed .. CallbackContext ??)
// to automatically remove an ContextedCallback
// Perhaps `once` can be reimplemented in these terms too ;)
public boolean shouldExecute() {
return true;
}
/**
* shouldRemove
* @return return value.
*/
public boolean shouldRemove() {
return false;
}
}