List of all callback defined by JavaMkKernel
The callback have to be a Java proc or method …
Read more about how to define a service-callback in theLink .
Example about the delete-callback-setup from the RPC server example/jv/LibSq3LiteRpcServer.java
ServerSetup : The DeleteCallback is usually installed in the Setup-Callback but only once.
if (ConfigGetIsParent()) { // call “RpcObjectDeleteCall” ONLY when deleting an instance whose class name matches the regular expression “^Sq3” MkObjectC.DeleteCallbackSetup("LibSq3LiteRpcServer", new RpcObjectDeleteCall(),"^Sq3"); }
The DeleteCallback is called before the deletion. In the RPC example, the RPC client is informed about the impending deletion.
class RpcObjectDeleteCall implements MkObjectDeleteIF { public void Callback ( MkObjectC obj ) { Send("E","%DEL:CCIH",ConfigGetName(),obj.ToNameOfType(),obj.HandleGetOfType(),obj.HandleGet()); } }
ServerCleanup : If the RPC server is deleted, the DeleteCallback is no longer needed and is therefore also deleted.
if (ConfigGetIsParent()) { MkObjectC.DeleteCallbackCleanup("LibSq3LiteRpcServer"); }